We were transforming the vertices' normals twice (bug 1) and
normalizing them after lighting (bug 2). In the lighting code, we were
then diverting from the spec to deal with the normal situation, which
is now no longer needed.
This fixes the lighting of Tux in Tux Racer.
AK's version should see better inlining behaviors, than the LibM one.
We avoid mixed usage for now though.
Also clean up some stale math includes and improper floatingpoint usage.
Matrix4x4 was defined as a derived class of Matrix<N,T> before.
Furthermore, some code was duplicated and it was overall just messy.
This commit turns Matrix4x4 into a simple alias for Matrix<4,T>.
Matrix elements were interpreted in different ways.
This makes it definitely row-major, allowing initialization via
initializer list in a standard scientific order. Also matrix
multiplication now happens in the correct order and accessing
elements happens as m_elements[row][column].
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *