mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Minor code cleanup.
This commit is contained in:
parent
77cb04154a
commit
12f12da21b
1 changed files with 2 additions and 3 deletions
|
@ -327,9 +327,9 @@ var CurveLocation = Base.extend(/** @lends CurveLocation# */{
|
||||||
// necessary to avoid issues wit CURVETIME_EPSILON imprecisions.
|
// necessary to avoid issues wit CURVETIME_EPSILON imprecisions.
|
||||||
var abs = Math.abs,
|
var abs = Math.abs,
|
||||||
epsilon = /*#=*/Numerical.GEOMETRIC_EPSILON,
|
epsilon = /*#=*/Numerical.GEOMETRIC_EPSILON,
|
||||||
|
diff = abs(this.getOffset() - loc.getOffset()),
|
||||||
i1 = !_ignoreOther && this._intersection,
|
i1 = !_ignoreOther && this._intersection,
|
||||||
i2 = !_ignoreOther && loc._intersection,
|
i2 = !_ignoreOther && loc._intersection;
|
||||||
diff = abs(this.getOffset() - loc.getOffset());
|
|
||||||
res = (diff < epsilon
|
res = (diff < epsilon
|
||||||
|| p1 && abs(p1.getLength() - diff) < epsilon)
|
|| p1 && abs(p1.getLength() - diff) < epsilon)
|
||||||
// Compare the the other location, but prevent endless
|
// Compare the the other location, but prevent endless
|
||||||
|
@ -360,7 +360,6 @@ var CurveLocation = Base.extend(/** @lends CurveLocation# */{
|
||||||
return '{ ' + parts.join(', ') + ' }';
|
return '{ ' + parts.join(', ') + ' }';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@grouptitle Tests}
|
* {@grouptitle Tests}
|
||||||
* Checks if the location is an intersection with another curve and is
|
* Checks if the location is an intersection with another curve and is
|
||||||
|
|
Loading…
Reference in a new issue