Skip to content

Commit 59adecc

Browse files
committed
Fix snapped on impl_float_ext
1 parent d03e73d commit 59adecc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

godot-core/src/builtin/math/float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ macro_rules! impl_float_ext {
119119

120120
fn snapped(mut self, step: Self) -> Self {
121121
if step != 0.0 {
122-
self = ((self / step + 0.5) * step).floor()
122+
self = (self / step + 0.5).floor() * step
123123
}
124124
self
125125
}

0 commit comments

Comments
 (0)