factor/library/math/more-matrices.factor

8 lines
203 B
Factor
Raw Normal View History

2005-05-21 02:28:23 -04:00
! Copyright (C) 2005 Slava Pestov.
! See http://factor.sf.net/license.txt for BSD license.
IN: matrices
USING: kernel math ;
2005-07-06 01:57:58 -04:00
: norm ( vec -- n ) norm-sq sqrt ;
: normalize ( vec -- vec ) dup norm v/n ;