11 | ||| Vector with no magnitude (unit for addition).
14 | ||| Multiplication by a scalar.
17 | ||| Division by a scalar.
20 | ||| Vector addition
23 | ||| Vector subtraction
26 | ||| Vector negation. Addition with a negated vector should
27 | ||| be same as subtraction.
31 | ||| Dot product (also known as scalar or inner product).
32 | ||| For two vectors, mathematically represented as a = a1,a2,...,an and b = b1,b2,...,bn,
33 | ||| the dot product is a . b = a1*b1 + a2*b2 + ... + an*bn.
36 | ||| Vector's norm (also known as magnitude).
37 | ||| For a vector represented mathematically
38 | ||| as a = a1,a2,...,an, the norm is the square root of a1^2 + a2^2 + ... + an^2.
42 | ||| Return a vector with the same origin and orientation (angle),
43 | ||| but such that the norm is one (the unit for multiplication by a scalar).
47 | --------------------------------------------------------------------------------
48 | -- Implementations
49 | --------------------------------------------------------------------------------