mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
simplify distance helper and factor out common bounds helper (#581)
* simplify distance helper * factor out common bounds helper
This commit is contained in:
parent
5853fba821
commit
7b842fc330
7 changed files with 42 additions and 77 deletions
|
@ -88,5 +88,5 @@ export function removeSelection() {
|
|||
}
|
||||
|
||||
export function distance(x: number, y: number) {
|
||||
return Math.abs(x > y ? x - y : y - x);
|
||||
return Math.abs(x - y);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue