mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
21 lines
427 B
JavaScript
21 lines
427 B
JavaScript
/* @flow */
|
|
'use strict';
|
|
|
|
export default class Vector {
|
|
x: number;
|
|
y: number;
|
|
|
|
constructor(x: number, y: number) {
|
|
this.x = x;
|
|
this.y = y;
|
|
if (__DEV__) {
|
|
if (isNaN(x)) {
|
|
console.error(`Invalid x value given for Vector`);
|
|
}
|
|
if (isNaN(y)) {
|
|
console.error(`Invalid y value given for Vector`);
|
|
}
|
|
}
|
|
}
|
|
}
|