Fix double undos, cleans up utils
This commit is contained in:
parent
8271e6d431
commit
bdafae3db6
53 changed files with 1676 additions and 1515 deletions
|
@ -1,17 +1,10 @@
|
|||
import { Bounds } from 'types'
|
||||
import { ease } from 'utils'
|
||||
import vec from 'utils/vec'
|
||||
|
||||
/**
|
||||
* ## Utils
|
||||
*/
|
||||
export default class Utils {
|
||||
static pointsBetween(a: number[], b: number[], steps = 6): number[][] {
|
||||
return Array.from(Array(steps))
|
||||
.map((_, i) => ease(i / steps))
|
||||
.map((t) => [...vec.lrp(a, b, t), (1 - t) / 2])
|
||||
}
|
||||
|
||||
static getRayRayIntersection(
|
||||
p0: number[],
|
||||
n0: number[],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue