UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

40 lines (39 loc) 750 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Circle = void 0; const point_1 = require("./point"); class Circle { x; y; r; constructor( /** center x-coordinate */ x, /** center y-coordinate */ y, /** radius */ r) { this.x = x; this.y = y; this.r = r; } center() { return new point_1.Point(this.x, this.y); } contains(point) { return this.center().distance(point) <= this.r; } left() { return this.x - this.r; } right() { return this.x + this.r; } top() { return this.y - this.r; } bottom() { return this.y + this.r; } } exports.Circle = Circle;