1
0
Fork 0

🔥 Fixed unneeded check and throw

This commit is contained in:
Joost De Cock 2018-08-14 09:21:24 +02:00
parent a878afe3a0
commit 9a6ab752da

View file

@ -225,9 +225,7 @@ function pathOffset(path, distance) {
/** Offsets a line by distance */
function offsetLine(from, to, distance) {
if (from.x === to.x && from.y === to.y) {
throw "Cannot offset a line that starts and ends in the same point";
}
if (from.x === to.x && from.y === to.y) return false;
let angle = from.angle(to) - 90;
return new Path()