X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fswingjs%2Fj2s%2FJU%2FV3d.js;fp=site%2Fswingjs%2Fj2s%2FJU%2FV3d.js;h=80234ebd37343e38564689e3b809d74499c08a9e;hp=c0287d49417bf980df537ac8ded3fa26425ac82f;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/swingjs/j2s/JU/V3d.js b/site/swingjs/j2s/JU/V3d.js index c0287d4..80234eb 100644 --- a/site/swingjs/j2s/JU/V3d.js +++ b/site/swingjs/j2s/JU/V3d.js @@ -1,27 +1,27 @@ -Clazz.declarePackage ("JU"); -Clazz.load (["JU.T3d"], "JU.V3d", null, function () { -c$ = Clazz.declareType (JU, "V3d", JU.T3d); -Clazz.defineMethod (c$, "cross", -function (v1, v2) { -this.set (v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.x); -}, "JU.V3d,JU.V3d"); -Clazz.defineMethod (c$, "normalize", -function () { -var d = this.length (); -this.x /= d; -this.y /= d; -this.z /= d; -}); -Clazz.defineMethod (c$, "dot", -function (v) { -return this.x * v.x + this.y * v.y + this.z * v.z; -}, "JU.V3d"); -Clazz.defineMethod (c$, "lengthSquared", -function () { -return this.x * this.x + this.y * this.y + this.z * this.z; -}); -Clazz.defineMethod (c$, "length", -function () { -return Math.sqrt (this.lengthSquared ()); -}); -}); +Clazz.declarePackage ("JU"); +Clazz.load (["JU.T3d"], "JU.V3d", null, function () { +c$ = Clazz.declareType (JU, "V3d", JU.T3d); +Clazz.defineMethod (c$, "cross", +function (v1, v2) { +this.set (v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.x); +}, "JU.V3d,JU.V3d"); +Clazz.defineMethod (c$, "normalize", +function () { +var d = this.length (); +this.x /= d; +this.y /= d; +this.z /= d; +}); +Clazz.defineMethod (c$, "dot", +function (v) { +return this.x * v.x + this.y * v.y + this.z * v.z; +}, "JU.V3d"); +Clazz.defineMethod (c$, "lengthSquared", +function () { +return this.x * this.x + this.y * this.y + this.z * this.z; +}); +Clazz.defineMethod (c$, "length", +function () { +return Math.sqrt (this.lengthSquared ()); +}); +});