Blender

How to get a partial transform matrix from an existing one

When rotating or moving an object using transformation matrices, in some cases we need to be able to extract a part of it from the entire rotation/movement. For example, when rotating an object by 180 degrees, we need to rotate it not at once, but in several steps, each time rotating it by 30 degrees. Linear interpolation of matrices can help us with this.

Comparing vectors

In order to compare two vectors – to determine whether both vectors point to the same place, we need to compare the coordinates of both vectors and if they are equal, then the vectors are also equal. However, the coordinates of the vectors are specified by float values, the comparison of which for equality, due to the peculiarities of storing this type in computer memory, is never accurate.