rename potentially conflicting vector3_max_component -> vector3_max_abs_component

This commit is contained in:
Garux
2024-10-28 16:18:18 +05:00
parent 35ea55f93a
commit 7451bd8a3d
+2 -2
View File
@@ -173,12 +173,12 @@ inline void planepts_quantise( PlanePoints planepts, double snap ){
vector3_snap( planepts[2], snap );
}
inline float vector3_max_component( const Vector3& vec3 ){
inline float vector3_max_abs_component( const Vector3& vec3 ){
return std::max( fabsf( vec3[0] ), std::max( fabsf( vec3[1] ), fabsf( vec3[2] ) ) );
}
inline void edge_snap( Vector3& edge, double snap ){
float scale = static_cast<float>( ceil( fabs( snap / vector3_max_component( edge ) ) ) );
float scale = static_cast<float>( ceil( fabs( snap / vector3_max_abs_component( edge ) ) ) );
if ( scale > 0.0f ) {
vector3_scale( edge, scale );
}