diff options
| author | Mel <einebeere@gmail.com> | 2021-10-18 21:58:23 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2021-10-18 21:58:23 +0200 |
| commit | bf0f05e64cc809f74e591c8a88f708265360f07d (patch) | |
| tree | c721fe127641f37e5858bc2f9e6d1ce52668cce8 /src | |
| parent | efd7e869f23913e73c38cd00644be38c97cd6635 (diff) | |
| download | rabbithole-bf0f05e64cc809f74e591c8a88f708265360f07d.tar.zst rabbithole-bf0f05e64cc809f74e591c8a88f708265360f07d.zip | |
Always make division produce floats.
Diffstat (limited to 'src')
| -rw-r--r-- | src/interpret/walker.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interpret/walker.rs b/src/interpret/walker.rs index 1602cd2..e301d44 100644 --- a/src/interpret/walker.rs +++ b/src/interpret/walker.rs @@ -123,7 +123,7 @@ impl Div for WalkValue { }, Self::Int(int) => match rhs { Self::Float(other_float) => Self::Float(int as f64 / other_float), - Self::Int(other_int) => Self::Int(int / other_int), + Self::Int(other_int) => Self::Float(int as f64 / other_int as f64), }, } } |
