🔥 Fixed unneeded check and throw
This commit is contained in:
parent
a878afe3a0
commit
9a6ab752da
1 changed files with 1 additions and 3 deletions
|
@ -225,9 +225,7 @@ function pathOffset(path, distance) {
|
||||||
|
|
||||||
/** Offsets a line by distance */
|
/** Offsets a line by distance */
|
||||||
function offsetLine(from, to, distance) {
|
function offsetLine(from, to, distance) {
|
||||||
if (from.x === to.x && from.y === to.y) {
|
if (from.x === to.x && from.y === to.y) return false;
|
||||||
throw "Cannot offset a line that starts and ends in the same point";
|
|
||||||
}
|
|
||||||
let angle = from.angle(to) - 90;
|
let angle = from.angle(to) - 90;
|
||||||
|
|
||||||
return new Path()
|
return new Path()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue