Remove clamp macro
Doesn't really need to exist since all it's doing is inlining std::clamp.
This commit is contained in:
@@ -163,7 +163,7 @@ float GetActualVoltageRadarValue( const NoteData &in, float fSongSeconds, const
|
||||
* it's the percent of the song the longest combo took to get. */
|
||||
const PlayerStageStats::Combo_t MaxCombo = pss.GetMaxCombo();
|
||||
float fComboPercent = SCALE(MaxCombo.m_fSizeSeconds, 0, fSongSeconds, 0.0f, 1.0f);
|
||||
return clamp( fComboPercent, 0.0f, 1.0f );
|
||||
return std::clamp( fComboPercent, 0.0f, 1.0f );
|
||||
}
|
||||
|
||||
// Return the ratio of actual to possible dance points.
|
||||
@@ -174,7 +174,7 @@ float GetActualChaosRadarValue( const NoteData &in, float fSongSeconds, const Pl
|
||||
return 1;
|
||||
|
||||
const int ActualDP = pss.m_iActualDancePoints;
|
||||
return clamp( float(ActualDP)/iPossibleDP, 0.0f, 1.0f );
|
||||
return std::clamp( float(ActualDP)/iPossibleDP, 0.0f, 1.0f );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -401,16 +401,16 @@ void NoteDataWithScoring::GetActualRadarValues(const NoteData &in,
|
||||
switch(rc)
|
||||
{
|
||||
case RadarCategory_Stream:
|
||||
out[rc]= note_count == 0 ? 0.0f : clamp(float(state.notes_hit_for_stream) / note_count, 0.0f, 1.0f);
|
||||
out[rc]= note_count == 0 ? 0.0f : std::clamp(float(state.notes_hit_for_stream) / note_count, 0.0f, 1.0f);
|
||||
break;
|
||||
case RadarCategory_Voltage:
|
||||
out[rc]= GetActualVoltageRadarValue(in, hittable_steps_length, pss);
|
||||
break;
|
||||
case RadarCategory_Air:
|
||||
out[rc]= jump_count == 0 ? 0.0f : clamp(float(state.jumps_hit_for_air) / jump_count, 0.0f, 1.0f);
|
||||
out[rc]= jump_count == 0 ? 0.0f : std::clamp(float(state.jumps_hit_for_air) / jump_count, 0.0f, 1.0f);
|
||||
break;
|
||||
case RadarCategory_Freeze:
|
||||
out[rc]= hold_count == 0 ? 0.0f : clamp(float(state.holds_held) / hold_count, 0.0f, 1.0f);
|
||||
out[rc]= hold_count == 0 ? 0.0f : std::clamp(float(state.holds_held) / hold_count, 0.0f, 1.0f);
|
||||
break;
|
||||
case RadarCategory_Chaos:
|
||||
out[rc]= GetActualChaosRadarValue(in, song_seconds, pss);
|
||||
|
||||
Reference in New Issue
Block a user