From 4dba6979dab13e97a2df4a3ca0bd44188a4b6b8b Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Wed, 20 May 2009 10:26:55 -0500 Subject: [PATCH] vector bilerp word --- basis/math/vectors/vectors.factor | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/basis/math/vectors/vectors.factor b/basis/math/vectors/vectors.factor index bad2733bbf..0fe1404516 100644 --- a/basis/math/vectors/vectors.factor +++ b/basis/math/vectors/vectors.factor @@ -58,6 +58,10 @@ IN: math.vectors : vnlerp ( a b t -- a_t ) [ lerp ] curry 2map ; +: vbilerp ( aa ba ab bb {t,u} -- a_tu ) + [ first vnlerp ] [ second vnlerp ] bi-curry + [ 2bi@ ] [ call ] bi* ; + HINTS: vneg { array } ; HINTS: norm-sq { array } ; HINTS: norm { array } ;