visual feedback on labels belonging to arrows and vice-versa
This commit is contained in:
parent
db246ccefe
commit
58a75ddd8b
5 changed files with 103 additions and 14 deletions
|
|
@ -133,7 +133,8 @@ export function intersectLines(a: Line2D, b: Line2D): Vec2D | null {
|
|||
export function euclideanDistance(a: Vec2D, b: Vec2D): number {
|
||||
const diffX = a.x - b.x;
|
||||
const diffY = a.y - b.y;
|
||||
return Math.sqrt(diffX*diffX + diffY*diffY);
|
||||
return Math.hypot(diffX, diffY);
|
||||
// return Math.sqrt(diffX*diffX + diffY*diffY);
|
||||
}
|
||||
|
||||
export function getLeftSide(rect: Rect2D): Line2D {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue