naquo

Untitled

Jul 18th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. (x:Numero, y:Numero): Punto
  2.  
  3. (a:Punto, b:Punto): Segmento
  4.  
  5. (x:Numero, y:Numero): Vector
  6.  
  7. (s:Segmento) -> ((s.b.x - s.a.x), (s.b.y - s.a.y)): Segmento_a_Vector
  8.  
  9. (v:Vector) -> ((v.x^2 + v.y^2)^(1/2)): Modulo
  10.  
  11. (v:Vector) -> (v.x/(v):Modulo, v.y/(v):Modulo): Versor
  12.  
  13. (v:Vector, n:Numero) -> (v.x * n, v.y * n): VectorEscalado
Advertisement
Add Comment
Please, Sign In to add comment