diff --git a/src/GafferSceneUI/SceneGadget.cpp b/src/GafferSceneUI/SceneGadget.cpp index dbca50dcdae..6c981485535 100644 --- a/src/GafferSceneUI/SceneGadget.cpp +++ b/src/GafferSceneUI/SceneGadget.cpp @@ -656,8 +656,8 @@ std::optional SceneGadget::normalAt( const IECore::LineSegment3f &lineInGad // incorrect. We know that the incoming `lineInGadgetSpace` has been calculated from // an integeer pixel value so we snap to the nearest integer as a corrective. V2f centerRasterP = viewportGadget->gadgetToRasterSpace( lineInGadgetSpace.p0, this ); - centerRasterP.x = (float)( (int)centerRasterP.x + 0.5 ); - centerRasterP.y = (float)( (int)centerRasterP.y + 0.5 ); + centerRasterP.x = (int)centerRasterP.x + 0.5f; + centerRasterP.y = (int)centerRasterP.y + 0.5f; if( objectAt( viewportGadget->rasterToGadgetSpace( centerRasterP, this ), centerPath, centerP ) ) {