mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
add safeties for enum math across define boundaries
This commit is contained in:
parent
1230d0d280
commit
aa02e48c8d
20 changed files with 71 additions and 71 deletions
|
|
@ -442,7 +442,7 @@ void GroundPlane::createGeometry( const Frustum& frustum )
|
|||
U32 width = mCeil( ( max.x - min.x ) / mSquareSize );
|
||||
if( width > MAX_WIDTH )
|
||||
{
|
||||
mSquareSize = mCeil( ( max.x - min.x ) / MAX_WIDTH );
|
||||
mSquareSize = mCeil( ( max.x - min.x ) / (F32)MAX_WIDTH );
|
||||
width = MAX_WIDTH;
|
||||
}
|
||||
else if( !width )
|
||||
|
|
@ -451,7 +451,7 @@ void GroundPlane::createGeometry( const Frustum& frustum )
|
|||
U32 height = mCeil( ( max.y - min.y ) / mSquareSize );
|
||||
if( height > MAX_HEIGHT )
|
||||
{
|
||||
mSquareSize = mCeil( ( max.y - min.y ) / MAX_HEIGHT );
|
||||
mSquareSize = mCeil( ( max.y - min.y ) / (F32)MAX_HEIGHT );
|
||||
height = MAX_HEIGHT;
|
||||
}
|
||||
else if( !height )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue