forked from JaylyDev/ScriptAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlockAreaSize.ts
More file actions
43 lines (42 loc) · 899 Bytes
/
BlockAreaSize.ts
File metadata and controls
43 lines (42 loc) · 899 Bytes
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
35
36
37
38
39
40
41
42
43
/**
* @beta
* Holds information for expressing the net size of a volume of
* blocks.
*/
export class BlockAreaSize {
/**
* X size (west to east) component of this block area.
*/
x: number;
/**
* Y size (down to up) of this block area size.
*/
y: number;
/**
* Z size (south to north) of this block area size.
*/
z: number;
/**
* @remarks
* Creates a new BlockAreaSize object.
* @param x
* @param y
* @param z
*/
constructor(x: number, y: number, z: number) {
this.x = Math.floor(x);
this.y = Math.floor(y);
this.z = Math.floor(z);
}
/**
* @remarks
* Tests whether this block area size is equal to another
* BlockAreaSize object.
* @param other
*/
equals(other: BlockAreaSize): boolean {
if (this.x === other.x && this.y === other.y && this.z === other.z)
return true;
else return false;
};
}