diff options
Diffstat (limited to 'src/com/android/gallery3d/filtershow/ui/ControlPoint.java')
-rw-r--r-- | src/com/android/gallery3d/filtershow/ui/ControlPoint.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/ui/ControlPoint.java b/src/com/android/gallery3d/filtershow/ui/ControlPoint.java index 73589d373..a95364b27 100644 --- a/src/com/android/gallery3d/filtershow/ui/ControlPoint.java +++ b/src/com/android/gallery3d/filtershow/ui/ControlPoint.java @@ -30,6 +30,23 @@ public class ControlPoint implements Comparable { y = point.y; } + public boolean sameValues(ControlPoint other) { + if (this == other) { + return true; + } + if (other == null) { + return false; + } + + if (Float.floatToIntBits(x) != Float.floatToIntBits(other.x)) { + return false; + } + if (Float.floatToIntBits(y) != Float.floatToIntBits(other.y)) { + return false; + } + return true; + } + public ControlPoint copy() { return new ControlPoint(x, y); } |