summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 896964a)
raw | patch | inline | side by side (parent: 896964a)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Fri, 11 Jan 2008 22:25:33 +0000 (22:25 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Fri, 11 Jan 2008 22:25:33 +0000 (22:25 +0000) |
src/snap.cpp | patch | blob | history |
diff --git a/src/snap.cpp b/src/snap.cpp
index 3bee26f730377cd215b5b4eeb6c06cda80824a0f..73a3b010b277692b8245530ad4cbfcc340baaf40 100644 (file)
--- a/src/snap.cpp
+++ b/src/snap.cpp
if (transformation_type == SCALE) {
// When scaling, don't ever exit with one of scaling components set to NR_HUGE
- if (best_transformation == NR::Point(NR_HUGE, NR_HUGE)) {
- best_transformation == transformation; // return the original (i.e. un-snapped) transformation
- } else {
- // Still one of the transformation components could be NR_HUGE
- for (int index = 0; index < 2; index++) {
- if (best_transformation[index] == NR_HUGE) {
- best_transformation[index] == uniform ? best_transformation[1-index] : transformation[index];
+ for (int index = 0; index < 2; index++) {
+ if (best_transformation[index] == NR_HUGE) {
+ if (uniform && best_transformation[1-index] < NR_HUGE) {
+ best_transformation[index] = best_transformation[1-index];
+ } else {
+ best_transformation[index] = transformation[index];
}
}
}