From 34dedcaab165a7df40c4f3f5adfffd63c3928874 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 22 Jun 2016 12:54:36 -0700 Subject: [PATCH] Remove half-up rounding. --- core/logic/smn_float.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/logic/smn_float.cpp b/core/logic/smn_float.cpp index 784de670..16aa972e 100644 --- a/core/logic/smn_float.cpp +++ b/core/logic/smn_float.cpp @@ -190,9 +190,8 @@ static cell_t sm_SquareRoot(IPluginContext *pCtx, const cell_t *params) static cell_t sm_RoundToNearest(IPluginContext *pCtx, const cell_t *params) { float val = sp_ctof(params[1]); - val = (float)floor(val + 0.5f); - return static_cast(val); + return (int)val; } static cell_t sm_RoundToFloor(IPluginContext *pCtx, const cell_t *params)