-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoref.js
More file actions
34 lines (33 loc) · 1.18 KB
/
coref.js
File metadata and controls
34 lines (33 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// coordinate.js, point.js
("use strict");
papaya = papaya || {};
papaya.core = papaya.core || {};
papaya.core.Coordinate =
papaya.core.Coordinate ||
function (a, b, h) {
this.x = a;
this.y = b;
this.z = h;
};
papaya.core.Coordinate.prototype.setCoordinate = function (a, b, h, e) {
e
? ((this.x = Math.round(a)),
(this.y = Math.round(b)),
(this.z = Math.round(h)))
: ((this.x = a), (this.y = b), (this.z = h));
};
papaya.core.Coordinate.prototype.toString = function () {
return "(" + this.x + "," + this.y + "," + this.z + ")";
};
papaya.core.Coordinate.prototype.isAllZeros = function () {
return 0 === this.x && 0 === this.y && 0 === this.z;
};
("use strict");
papaya = papaya || {};
papaya.core = papaya.core || {};
papaya.core.Point =
papaya.core.Point ||
function (a, b) {
this.x = a;
this.y = b;
};