JAL-1807 includes ?j2sdebug flag and DebugJS._(msg)
[jalviewjs.git] / bin / javajs / util / T3i.js
1 Clazz.declarePackage ("javajs.util");
2 c$ = Clazz.decorateAsClass (function () {
3 this.x = 0;
4 this.y = 0;
5 this.z = 0;
6 Clazz.instantialize (this, arguments);
7 }, javajs.util, "T3i", null, java.io.Serializable);
8 Clazz.makeConstructor (c$, 
9 function () {
10 });
11 Clazz.defineMethod (c$, "set", 
12 function (x, y, z) {
13 this.x = x;
14 this.y = y;
15 this.z = z;
16 }, "~N,~N,~N");
17 Clazz.defineMethod (c$, "setT", 
18 function (t1) {
19 this.x = t1.x;
20 this.y = t1.y;
21 this.z = t1.z;
22 }, "javajs.util.T3i");
23 Clazz.defineMethod (c$, "add", 
24 function (t) {
25 this.x += t.x;
26 this.y += t.y;
27 this.z += t.z;
28 }, "javajs.util.T3i");
29 Clazz.defineMethod (c$, "scaleAdd", 
30 function (s, t1, t2) {
31 this.x = s * t1.x + t2.x;
32 this.y = s * t1.y + t2.y;
33 this.z = s * t1.z + t2.z;
34 }, "~N,javajs.util.T3i,javajs.util.T3i");
35 Clazz.overrideMethod (c$, "hashCode", 
36 function () {
37 return this.x ^ this.y ^ this.z;
38 });
39 Clazz.overrideMethod (c$, "equals", 
40 function (o) {
41 if (!(Clazz.instanceOf (o, javajs.util.T3i))) return false;
42 var t = o;
43 return (this.x == t.x && this.y == t.y && this.z == t.z);
44 }, "~O");
45 Clazz.overrideMethod (c$, "toString", 
46 function () {
47 return "(" + this.x + ", " + this.y + ", " + this.z + ")";
48 });