Fix double undos, cleans up utils

This commit is contained in:
Steve Ruiz 2021-06-24 13:34:43 +01:00
parent 8271e6d431
commit bdafae3db6
53 changed files with 1676 additions and 1515 deletions

View file

@ -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[],