image-js
Version:
Image processing and manipulation in JavaScript
11 lines • 436 B
JavaScript
/**
* Check that the coordinates of a point are integers.
* @param point - Point to check.
* @param name - Specify name of the point to include in the error message.
*/
export function checkPointIsInteger(point, name = 'Point') {
if (!Number.isInteger(point.row) || !Number.isInteger(point.column)) {
throw new TypeError(`${name} row and column must be integers`);
}
}
//# sourceMappingURL=checkPointIsInteger.js.map