Made entity.cpp compatible with (again) new math library interface.