Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / src / javajs / util / P4.java
index 8b52ee5..a434f53 100644 (file)
@@ -1,70 +1,70 @@
-/*\r
-   Copyright (C) 1997,1998,1999\r
-   Kenji Hiranabe, Eiwa System Management, Inc.\r
-\r
-   This program is free software.\r
-   Implemented by Kenji Hiranabe(hiranabe@esm.co.jp),\r
-   conforming to the Java(TM) 3D API specification by Sun Microsystems.\r
-\r
-   Permission to use, copy, modify, distribute and sell this software\r
-   and its documentation for any purpose is hereby granted without fee,\r
-   provided that the above copyright notice appear in all copies and\r
-   that both that copyright notice and this permission notice appear\r
-   in supporting documentation. Kenji Hiranabe and Eiwa System Management,Inc.\r
-   makes no representations about the suitability of this software for any\r
-   purpose.  It is provided "AS IS" with NO WARRANTY.\r
-*/\r
-package javajs.util;\r
-\r
-\r
-\r
-/**\r
- * A 4 element point that is represented by single precision floating point\r
- * x,y,z,w coordinates.\r
- * \r
- * @version specification 1.1, implementation $Revision: 1.9 $, $Date:\r
- *          2006/07/28 17:01:32 $\r
- * @author Kenji hiranabe\r
- * \r
- * additions by Bob Hanson hansonr@stolaf.edu 9/30/2012\r
- * for unique constructor and method names\r
- * for the optimization of compiled JavaScript using Java2Script\r
- */\r
-public class P4 extends T4 {\r
-\r
-  /**\r
-   * \r
-   * @j2sIgnore   * \r
-   */\r
-  public P4() {\r
-    // skip T4() constructor\r
-  }\r
-  \r
-  public static P4 new4(float x, float y, float z, float w) {\r
-    P4 pt = new P4();\r
-    pt.set4(x, y, z, w);\r
-    return pt;\r
-  }\r
-\r
-  public static P4 newPt(P4 value) {\r
-    P4 pt = new P4();\r
-    pt.set4(value.x, value.y, value.z, value.w);    \r
-    return pt;\r
-  }\r
-\r
-  /**\r
-   * Returns the distance between this point and point p1.\r
-   * \r
-   * @param p1\r
-   *        the other point\r
-   * @return the distance between these two points\r
-   */\r
-  public final float distance4(P4 p1) {\r
-    double dx = x - p1.x;\r
-    double dy = y - p1.y;\r
-    double dz = z - p1.z;\r
-    double dw = w - p1.w;\r
-    return (float) Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r
-  }\r
-\r
-}\r
+/*
+   Copyright (C) 1997,1998,1999
+   Kenji Hiranabe, Eiwa System Management, Inc.
+
+   This program is free software.
+   Implemented by Kenji Hiranabe(hiranabe@esm.co.jp),
+   conforming to the Java(TM) 3D API specification by Sun Microsystems.
+
+   Permission to use, copy, modify, distribute and sell this software
+   and its documentation for any purpose is hereby granted without fee,
+   provided that the above copyright notice appear in all copies and
+   that both that copyright notice and this permission notice appear
+   in supporting documentation. Kenji Hiranabe and Eiwa System Management,Inc.
+   makes no representations about the suitability of this software for any
+   purpose.  It is provided "AS IS" with NO WARRANTY.
+*/
+package javajs.util;
+
+
+
+/**
+ * A 4 element point that is represented by single precision floating point
+ * x,y,z,w coordinates.
+ * 
+ * @version specification 1.1, implementation $Revision: 1.9 $, $Date:
+ *          2006/07/28 17:01:32 $
+ * @author Kenji hiranabe
+ * 
+ * additions by Bob Hanson hansonr@stolaf.edu 9/30/2012
+ * for unique constructor and method names
+ * for the optimization of compiled JavaScript using Java2Script
+ */
+public class P4 extends T4 {
+
+  /**
+   * 
+   * @j2sIgnore   * 
+   */
+  public P4() {
+    // skip T4() constructor
+  }
+  
+  public static P4 new4(float x, float y, float z, float w) {
+    P4 pt = new P4();
+    pt.set4(x, y, z, w);
+    return pt;
+  }
+
+  public static P4 newPt(P4 value) {
+    P4 pt = new P4();
+    pt.set4(value.x, value.y, value.z, value.w);    
+    return pt;
+  }
+
+  /**
+   * Returns the distance between this point and point p1.
+   * 
+   * @param p1
+   *        the other point
+   * @return the distance between these two points
+   */
+  public final float distance4(P4 p1) {
+    double dx = x - p1.x;
+    double dy = y - p1.y;
+    double dz = z - p1.z;
+    double dw = w - p1.w;
+    return (float) Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);
+  }
+
+}