1 Clazz.declarePackage ("JU");
2 Clazz.load (null, "JU.T3d", ["java.lang.Double"], function () {
3 c$ = Clazz.decorateAsClass (function () {
7 Clazz.instantialize (this, arguments);
8 }, JU, "T3d", null, java.io.Serializable);
9 Clazz.makeConstructor (c$,
12 Clazz.defineMethod (c$, "set",
18 Clazz.defineMethod (c$, "setA",
24 Clazz.defineMethod (c$, "setT",
30 Clazz.defineMethod (c$, "add2",
36 Clazz.defineMethod (c$, "add",
42 Clazz.defineMethod (c$, "sub2",
48 Clazz.defineMethod (c$, "sub",
54 Clazz.defineMethod (c$, "scale",
60 Clazz.defineMethod (c$, "scaleAdd",
61 function (s, t1, t2) {
62 this.x = s * t1.x + t2.x;
63 this.y = s * t1.y + t2.y;
64 this.z = s * t1.z + t2.z;
65 }, "~N,JU.T3d,JU.T3d");
66 Clazz.overrideMethod (c$, "hashCode",
68 var xbits = JU.T3d.doubleToLongBits0 (this.x);
69 var ybits = JU.T3d.doubleToLongBits0 (this.y);
70 var zbits = JU.T3d.doubleToLongBits0 (this.z);
71 return (xbits ^ (xbits >> 32) ^ ybits ^ (ybits >> 32) ^ zbits ^ (zbits >> 32));
73 c$.doubleToLongBits0 = Clazz.defineMethod (c$, "doubleToLongBits0",
75 return (d == 0 ? 0 : Double.doubleToLongBits (d));
77 Clazz.overrideMethod (c$, "equals",
79 if (!(Clazz.instanceOf (t1, JU.T3d))) return false;
81 return (this.x == t2.x && this.y == t2.y && this.z == t2.z);
83 Clazz.overrideMethod (c$, "toString",
85 return "{" + this.x + ", " + this.y + ", " + this.z + "}";