UnitVector Command
- UnitVector( <Vector> )
-
Yields a vector with length 1, which has the same direction and orientation as the given vector. The vector must be defined first.
Let v=(34). UnitVector(v)
yields
(0.60.8).
- UnitVector( <Line> )
-
Yields the direction vector of the given line with length 1.
UnitVector(3x + 4y = 5)
yields (0.8−0.6).
- UnitVector( <Segment> )
-
Yields the direction vector of the given segment with length 1.
Let s = Segment((1,1),(4,5))
.
UnitVector(s)
yields (0.60.8).
|
-
UnitVector((a, b))
yields (a√a2+b2, b√a2+b2). -
UnitVector((2, 4, 4))
yields (13, 23, 23).