@tdurtschi/bug
Version:
Bug is a simulation that models a weevil walking around in an HTML canvas.
17 lines • 596 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.expectEquals = exports.vectorEquals = void 0;
exports.vectorEquals = function (a, b, debug) {
if (debug === void 0) { debug = true; }
var result = a.x === b.x && a.y === b.y;
if (!result && debug) {
console.log("Testing for vector equality but failed.");
console.log(a);
console.log(b);
}
return result;
};
exports.expectEquals = function (a, b) {
expect(exports.vectorEquals(a, b)).toBeTruthy("(" + a + ") != (" + b + ")");
};
//# sourceMappingURL=vectors.js.map