- C++ Game Development By Example
- Siddharth Shekar
- 254字
- 2021-06-24 14:26:15
Unit vector
In some cases, we don't care about the magnitude of the vector, we just want to know the direction of the vector. To find this out, we want the length of the vector in the X, Y and Z direction to be equal to 1. Such vectors are called unit vectors or normalized vectors.
In unit vectors, the X, Y, and Z components of the vector are divided by the magnitude to create a vector of unit length. They are denoted by a hat on top of the vector name instead of an arrow. So, a unit vector of A will be denoted as .


When a vector is converted into a unit vector, it is said to be normalized. Meaning the value is always between 0.0 and 1.0. The original value has been rescaled to be in this range. Let's normalize the vector = (3, -5, 7)
First we have to calculate the magnitude of , which we have already done before i.e 9.11
So, unit vector
= (3 , -5, 7) / 9.11
= (3 / 9.11 , -5 / 9.11, 7 / 9.11)
= (0.33, -0.51, 0.77)
- 深入理解Spring Cloud與實戰(zhàn)
- Linux KVM虛擬化架構(gòu)實戰(zhàn)指南
- 電腦維護與故障排除傻瓜書(Windows 10適用)
- Applied Unsupervised Learning with R
- Python GUI Programming:A Complete Reference Guide
- Intel FPGA/CPLD設(shè)計(高級篇)
- 電腦常見故障現(xiàn)場處理
- Camtasia Studio 8:Advanced Editing and Publishing Techniques
- Mastering Adobe Photoshop Elements
- R Deep Learning Essentials
- 無蘋果不生活:OS X Mountain Lion 隨身寶典
- WebGL Hotshot
- 單片機原理及應(yīng)用:基于C51+Proteus仿真
- Mastering Quantum Computing with IBM QX
- 單片機原理及應(yīng)用