math.physics.pos: distance method
parent
4812c95db6
commit
c1328ac08e
|
@ -1,5 +1,17 @@
|
|||
|
||||
USING: kernel sequences multi-methods accessors math.vectors ;
|
||||
|
||||
IN: math.physics.pos
|
||||
|
||||
TUPLE: pos pos ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
GENERIC: distance ( a b -- c )
|
||||
|
||||
METHOD: distance { sequence sequence } v- norm ;
|
||||
|
||||
METHOD: distance { pos pos } [ pos>> ] bi@ distance ;
|
||||
|
||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
|
|
Loading…
Reference in New Issue