UNPKG

@minofrk/xelto-diagram-canvas

Version:

An implementation of <xelto-diagram> in TypeScript.

45 lines 811 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function plus(p, q) { return { x: p.x + q.x, y: p.y + q.y, }; } exports.plus = plus; function minus(p, q) { return { x: p.x - q.x, y: p.y - q.y, }; } exports.minus = minus; function times({ x, y }, k) { return { x: x * k, y: y * k, }; } exports.times = times; function elementWiseTimes(p, q) { return { x: p.x * q.x, y: p.y * q.y, }; } exports.elementWiseTimes = elementWiseTimes; function floor({ x, y }) { return { x: Math.floor(x), y: Math.floor(y), }; } exports.floor = floor; function square(w) { return { x: w, y: w, }; } exports.square = square; //# sourceMappingURL=point-ops.js.map