@irysius/grid-math
Version:
Tools to assist with grid math and algorithms
23 lines (22 loc) • 729 B
JavaScript
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function create(width, height) {
return { width, height };
}
exports.create = create;
function isSize(v) {
return !!(v &&
typeof v.width === 'number' &&
typeof v.height === 'number');
}
exports.isSize = isSize;
});