Move truncf, roundf fallbacks to the right place.

Fix BeatToNoteRow rounding backwards for negative numbers.
This commit is contained in:
Glenn Maynard
2003-10-27 03:45:15 +00:00
parent f1d94cfb83
commit 0eaa9aa178
3 changed files with 9 additions and 14 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ struct HoldNote
};
inline int BeatToNoteRow( float fBeatNum ) { return int( fBeatNum * ROWS_PER_BEAT + 0.5f); }; // round
inline int BeatToNoteRow( float fBeatNum ) { return (int) roundf( fBeatNum * ROWS_PER_BEAT); };
inline int BeatToNoteRowNotRounded( float fBeatNum ) { return (int)( fBeatNum * ROWS_PER_BEAT ); };
inline float NoteRowToBeat( float fNoteIndex ) { return fNoteIndex / (float)ROWS_PER_BEAT; };
inline float NoteRowToBeat( int iNoteIndex ) { return NoteRowToBeat( (float)iNoteIndex ); };