[*] wrapping for flatXY
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
|
||||
export default class Point {
|
||||
constructor(x, y) {
|
||||
if (typeof x === 'object') {
|
||||
y = x.y;
|
||||
x = x.x;
|
||||
}
|
||||
|
||||
// add zero to turn -0 into 0
|
||||
this.x = Math.round(x) + 0;
|
||||
this.y = Math.round(y) + 0;
|
||||
|
||||
Reference in New Issue
Block a user