Skip to content

Commit

Permalink
Use float literals when comparing float numbers.
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacsv committed Nov 12, 2020
1 parent c2e30e6 commit a740285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/MacOSAppSupport/MAS_NodeEditorNSViewControl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ - (void) scrollWheel : (NSEvent*) event
if ([event subtype] == NSEventSubtypeMouseEvent || [event modifierFlags] & NSEventModifierFlagOption) {
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
NUIE::MouseWheelRotation rotation = NUIE::MouseWheelRotation::Forward;
if (deltaX + deltaY < 0) {
if (deltaX + deltaY < 0.0f) {
rotation = NUIE::MouseWheelRotation::Backward;
}
nodeEditor->OnMouseWheel (modifierKeys, rotation, position.GetX (), position.GetY ());
Expand All @@ -136,7 +136,7 @@ - (void) magnifyWithEvent : (NSEvent*) event
{
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
NUIE::MouseWheelRotation rotation = NUIE::MouseWheelRotation::Forward;
if ([event magnification] < 0) {
if ([event magnification] < 0.0f) {
rotation = NUIE::MouseWheelRotation::Backward;
}
NUIE::NodeEditor* nodeEditor = nodeEditorControl->GetNodeEditor ();
Expand Down

0 comments on commit a740285

Please sign in to comment.