First, thank you for your work, but I found a logical error. In calculating the vector product using vector3f, your formula is:
inline vector3f cross(vector3f const & v1, vector3f const & v2)
{
return {v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.z};
}
The actual formula is:

First, thank you for your work, but I found a logical error. In calculating the vector product using
vector3f, your formula is:inline vector3f cross(vector3f const & v1, vector3f const & v2)
{
return {v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.z};
}
The actual formula is: