mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 02:09:17 +02:00
Use the sq function to force constexpr expressions for numeric literals and enhance readability
This commit is contained in:
@@ -71,7 +71,7 @@ basic_precipitation::update() {
|
||||
}
|
||||
// ... from camera jump to another location
|
||||
// length2 is better than length for comparing because it does not require sqrt function
|
||||
if( glm::length2( cameramove ) > 100.0 * 100.0 )
|
||||
if( glm::length2( cameramove ) > sq(100.0) )
|
||||
{
|
||||
cameramove = glm::dvec3{ 0.0 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user