Next: Vector Tutorial Exercise 2, Previous: Arithmetic Tutorial Exercise 2, Up: Answers to Exercises [Contents][Index]
Duplicate the vector, compute its length, then divide the vector by its length: RET A /.
1: [1, 2, 3] 2: [1, 2, 3] 1: [0.27, 0.53, 0.80] 1: 1.
. 1: 3.74165738677 . .
.
r 1 RET A / A
The final A command shows that the normalized vector does indeed have unit length.