Very nice but the <math.h> can tweak this and the optimization would make up for the speed aspect.
View: https://youtu.be/p8u_k2LIZyo
Fast inverse square root, sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5F3759DF, is an algorithm that estimates 1 x {\displaystyle {\frac {1}{\sqrt {x}}}} , the reciprocal (or multiplicative inverse) of the square root of a 32-bit floating-point number x {\displaystyle x} in IEEE 754 floating-point format. This operation is used in digital signal processing to normalize a vector, i.e., scale it to length 1. For example, computer graphics programs use inverse square roots to compute angles of incidence and reflection for lighting and shading.
Fast inverse square root, sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5F3759DF, is an algorithm that estimates 1 x {\displaystyle {\frac {1}{\sqrt {x}}}}