mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-08 05:42:07 -05:00
Compress Point#getQuadrant() to one line.
This commit is contained in:
parent
77c19601ff
commit
756c4f37c5
1 changed files with 1 additions and 13 deletions
|
@ -177,19 +177,7 @@ var Point = this.Point = Base.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
getQuadrant: function() {
|
getQuadrant: function() {
|
||||||
if (this.x >= 0) {
|
return this.x >= 0 ? this.y >= 0 ? 1 : 4 : this.y >= 0 ? 2 : 3;
|
||||||
if (this.y >= 0) {
|
|
||||||
return 1;
|
|
||||||
} else {
|
|
||||||
return 4;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (this.y >= 0) {
|
|
||||||
return 2;
|
|
||||||
} else {
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue