From 774ae6fa5be2fffef30c0857cbee34982b14fc7a Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 23 Jan 2005 19:10:44 +0000 Subject: [PATCH] fix delete in the editor (BeatToNoteRow was wrong for negative numbers) --- stepmania/src/NoteTypes.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stepmania/src/NoteTypes.h b/stepmania/src/NoteTypes.h index 6520caca4f..f9cf2abb11 100644 --- a/stepmania/src/NoteTypes.h +++ b/stepmania/src/NoteTypes.h @@ -170,10 +170,10 @@ NoteType BeatToNoteType( float fBeat ); bool IsNoteOfType( int row, NoteType t ); CString NoteTypeToString( NoteType nt ); -inline int BeatToNoteRow( float fBeatNum ) { return int( fBeatNum * ROWS_PER_BEAT + 0.5f); }; // round +inline int BeatToNoteRow( float fBeatNum ) { return lrintf( fBeatNum * ROWS_PER_BEAT ); } // round 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 row ) { return NoteRowToBeat( (float)row ); }; +inline float NoteRowToBeat( float fNoteIndex ) { return fNoteIndex / (float)ROWS_PER_BEAT; } +inline float NoteRowToBeat( int row ) { return NoteRowToBeat( (float)row ); }