]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/jamshred/oint/oint.factor
factor: trim using lists
[factor.git] / extra / jamshred / oint / oint.factor
index 63bc29d9f560a0a5707513e8ed31b1f57c3a4fbb..2e772c2f22cc73289590700184357dcfd15cf95d 100644 (file)
@@ -1,6 +1,7 @@
 ! Copyright (C) 2007, 2008 Alex Chapman
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays kernel locals math math.constants math.functions math.matrices math.vectors random sequences ;
+USING: accessors arrays kernel math math.functions math.vectors
+random sequences ;
 IN: jamshred.oint
 
 ! An oint is a point with three linearly independent unit vectors
@@ -78,11 +79,11 @@ PRIVATE>
     [ location>> ] bi@ swap v- ;
 
 : distance ( oint oint -- distance )
-    distance-vector l2-norm ;
+    distance-vector norm ;
 
 : scalar-projection ( v1 v2 -- n )
     ! the scalar projection of v1 onto v2
-    [ vdot ] [ l2-norm ] bi / ;
+    [ vdot ] [ norm ] bi / ;
 
 : proj-perp ( u v -- w )
     dupd proj v- ;