Outlines feature complete
This commit is contained in:
parent
066e1a54ea
commit
827cfeea21
8 changed files with 181 additions and 83 deletions
12
src/point.js
12
src/point.js
|
@ -24,14 +24,10 @@ module.exports = class Point {
|
|||
[this.x, this.y] = val
|
||||
}
|
||||
|
||||
add(a) {
|
||||
const res = this.clone()
|
||||
res.x += a[0]
|
||||
res.y += a[1]
|
||||
return res
|
||||
}
|
||||
|
||||
shift(s) {
|
||||
shift(s, relative=true) {
|
||||
if (relative) {
|
||||
s = m.point.rotate(s, this.r)
|
||||
}
|
||||
this.x += s[0]
|
||||
this.y += s[1]
|
||||
return this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue