mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-24 13:55:34 +00:00
Moves the delta-based rounding function Verve used up into the engine so it wouldn't override the regular mRound function. Now is mRoundDelta.
This commit is contained in:
parent
b62ea8c701
commit
247c0eb34a
4 changed files with 14 additions and 14 deletions
|
|
@ -91,7 +91,7 @@ function VDirectorEvent::getSnapTime( %this, %targetTime )
|
|||
if ( $VerveEditor::Event::SnapTime > 0 )
|
||||
{
|
||||
// Snap.
|
||||
return mRound( %targetTime, $VerveEditor::Event::SnapTime );
|
||||
return mRoundDelta( %targetTime, $VerveEditor::Event::SnapTime );
|
||||
}
|
||||
|
||||
// No Snap!
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ function VEvent::getSnapTime( %this, %targetTime )
|
|||
if ( $Pref::VerveEditor::Event::SnapToTime && $Pref::VerveEditor::Event::SnapToTimeThreshold > 0 )
|
||||
{
|
||||
// Snap.
|
||||
return mRound( %targetTime, $Pref::VerveEditor::Event::SnapToTimeThreshold );
|
||||
return mRoundDelta( %targetTime, $Pref::VerveEditor::Event::SnapToTimeThreshold );
|
||||
}
|
||||
|
||||
// No Snap!
|
||||
|
|
|
|||
|
|
@ -45,17 +45,6 @@ function GuiControl::getParentOfType( %this, %className )
|
|||
return 0;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// MATH
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function mRound( %number, %delta )
|
||||
{
|
||||
return ( mFloor( %number / %delta + 0.5 ) * %delta );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// STRING
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue