Skip to content

Commit a740285

Browse files
committed
Use float literals when comparing float numbers.
1 parent c2e30e6 commit a740285

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/MacOSAppSupport/MAS_NodeEditorNSViewControl.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ - (void) scrollWheel : (NSEvent*) event
123123
if ([event subtype] == NSEventSubtypeMouseEvent || [event modifierFlags] & NSEventModifierFlagOption) {
124124
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
125125
NUIE::MouseWheelRotation rotation = NUIE::MouseWheelRotation::Forward;
126-
if (deltaX + deltaY < 0) {
126+
if (deltaX + deltaY < 0.0f) {
127127
rotation = NUIE::MouseWheelRotation::Backward;
128128
}
129129
nodeEditor->OnMouseWheel (modifierKeys, rotation, position.GetX (), position.GetY ());
@@ -136,7 +136,7 @@ - (void) magnifyWithEvent : (NSEvent*) event
136136
{
137137
NUIE::Point position = MAS::GetViewPositionFromEvent (self, event);
138138
NUIE::MouseWheelRotation rotation = NUIE::MouseWheelRotation::Forward;
139-
if ([event magnification] < 0) {
139+
if ([event magnification] < 0.0f) {
140140
rotation = NUIE::MouseWheelRotation::Backward;
141141
}
142142
NUIE::NodeEditor* nodeEditor = nodeEditorControl->GetNodeEditor ();

0 commit comments

Comments
 (0)