commit 134260bfedf3086864f3b6efcd4634fc80dc88ef
parent 87313648cc9e42f04698ab46387545e813a65a9c
Author: Dominik Schmidt <das1993@hotmail.com>
Date: Sat, 22 Aug 2015 11:14:17 +0200
Rename Puzzle[C,D]Vec to [C,D]Vec.
Diffstat:
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/puzzle.d b/puzzle.d
@@ -94,15 +94,15 @@ class Puzzle{
~this(){
puzzle_free_context(&ctx);
}
- PuzzleDVec dvec(){
- return PuzzleDVec(&ctx);
+ DVec dvec(){
+ return DVec(&ctx);
}
- PuzzleCVec cvec(){
- return PuzzleCVec(&ctx);
+ CVec cvec(){
+ return CVec(&ctx);
}
}
-struct PuzzleDVec{
+struct DVec{
PuzzleDvec vec;
PuzzleContext *ctx;
this(PuzzleContext *ctx){
@@ -118,13 +118,13 @@ struct PuzzleDVec{
void load(void mem[]){
puzzle_fill_dvec_from_mem(ctx, &vec, cast(void*)mem, mem.length);
}
- PuzzleCVec dvec(){
- PuzzleCVec cvec=PuzzleCVec(ctx);
+ CVec dvec(){
+ CVec cvec=CVec(ctx);
puzzle_fill_cvec_from_dvec(ctx,&cvec.vec,&vec);
return cvec;
}
}
-struct PuzzleCVec{
+struct CVec{
PuzzleCvec vec;
PuzzleContext *ctx;
this(PuzzleContext *ctx){
@@ -140,7 +140,7 @@ struct PuzzleCVec{
void load(void mem[]){
puzzle_fill_cvec_from_mem(ctx, &vec, cast(void*)mem, mem.length);
}
- double compare(in ref PuzzleCVec b, bool hasText=false){
+ double compare(in ref CVec b, bool hasText=false){
return puzzle_vector_normalized_distance(ctx,&vec,&b.vec,(hasText) ? 1 : 0);
}
}