JAL-1807 test
[jalviewjs.git] / bin / javajs / util / T4.js
1 Clazz.declarePackage ("javajs.util");
2 Clazz.load (["javajs.util.T3"], "javajs.util.T4", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.w = 0;
5 Clazz.instantialize (this, arguments);
6 }, javajs.util, "T4", javajs.util.T3);
7 Clazz.defineMethod (c$, "set4", 
8 function (x, y, z, w) {
9 this.x = x;
10 this.y = y;
11 this.z = z;
12 this.w = w;
13 }, "~N,~N,~N,~N");
14 Clazz.defineMethod (c$, "scale4", 
15 function (s) {
16 this.scale (s);
17 this.w *= s;
18 }, "~N");
19 Clazz.overrideMethod (c$, "hashCode", 
20 function () {
21 return javajs.util.T3.floatToIntBits0 (this.x) ^ javajs.util.T3.floatToIntBits0 (this.y) ^ javajs.util.T3.floatToIntBits0 (this.z) ^ javajs.util.T3.floatToIntBits0 (this.w);
22 });
23 Clazz.overrideMethod (c$, "equals", 
24 function (o) {
25 if (!(Clazz.instanceOf (o, javajs.util.T4))) return false;
26 var t = o;
27 return (this.x == t.x && this.y == t.y && this.z == t.z && this.w == t.w);
28 }, "~O");
29 Clazz.overrideMethod (c$, "toString", 
30 function () {
31 return "(" + this.x + ", " + this.y + ", " + this.z + ", " + this.w + ")";
32 });
33 Clazz.overrideMethod (c$, "toJSON", 
34 function () {
35 return "[" + this.x + ", " + this.y + ", " + this.z + ", " + this.w + "]";
36 });
37 });