]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.datatypes/src/org/simantics/datatypes/literal/Vec2i.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.datatypes / src / org / simantics / datatypes / literal / Vec2i.java
index 2b0c0a81ffa96156d65fedf268327ddae4915c68..b25e8eacbc3831c8c6461c1f84e743b5aa76e700 100644 (file)
@@ -1,50 +1,50 @@
-package org.simantics.datatypes.literal;\r
-\r
-import org.simantics.databoard.Bindings;\r
-import org.simantics.databoard.binding.Binding;\r
-import org.simantics.databoard.util.Bean;\r
-\r
-\r
-final public class Vec2i extends Bean {\r
-\r
-       public static final Binding BINDING = Bindings.getBindingUnchecked(Vec2i.class);\r
-\r
-       public int x;\r
-       public int y;\r
-\r
-       public Vec2i(int x, int y) {\r
-               super(BINDING);\r
-               this.x = x;\r
-               this.y = y;\r
-       }\r
-\r
-       public boolean isZero() {\r
-               return x==0 && y==0; \r
-       }\r
-       \r
-       public double norm1() {\r
-               return Math.abs(x) + Math.abs(y);\r
-       }\r
-       \r
-       public double norm2() {\r
-               return Math.sqrt(x*x+y*y);\r
-       }\r
-       \r
-       public double length() {\r
-               return norm2();\r
-       }\r
-       \r
-       public double dot(Vec2i other) {\r
-               return x*other.x + y*other.y;\r
-       }\r
-\r
-       public Vec2i sum(Vec2i other) {\r
-               return new Vec2i(x + other.x , y + other.y);\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "Vec2i[x=" + x + ", y=" + y + "]";\r
-       }\r
-       \r
-}\r
+package org.simantics.datatypes.literal;
+
+import org.simantics.databoard.Bindings;
+import org.simantics.databoard.binding.Binding;
+import org.simantics.databoard.util.Bean;
+
+
+final public class Vec2i extends Bean {
+
+       public static final Binding BINDING = Bindings.getBindingUnchecked(Vec2i.class);
+
+       public int x;
+       public int y;
+
+       public Vec2i(int x, int y) {
+               super(BINDING);
+               this.x = x;
+               this.y = y;
+       }
+
+       public boolean isZero() {
+               return x==0 && y==0; 
+       }
+       
+       public double norm1() {
+               return Math.abs(x) + Math.abs(y);
+       }
+       
+       public double norm2() {
+               return Math.sqrt(x*x+y*y);
+       }
+       
+       public double length() {
+               return norm2();
+       }
+       
+       public double dot(Vec2i other) {
+               return x*other.x + y*other.y;
+       }
+
+       public Vec2i sum(Vec2i other) {
+               return new Vec2i(x + other.x , y + other.y);
+       }
+
+       @Override
+       public String toString() {
+               return "Vec2i[x=" + x + ", y=" + y + "]";
+       }
+       
+}