Fix add squaring on floats instead
This commit is contained in:
parent
9cf2e671d3
commit
e9a28f074c
|
@ -639,7 +639,7 @@ pub const RuntimeEnv = struct {
|
||||||
|
|
||||||
return switch (addable.internal().payload) {
|
return switch (addable.internal().payload) {
|
||||||
.fixed => |lhs_fixed| self.new_float(@as(Float, @floatFromInt(lhs_fixed)) + rhs_float),
|
.fixed => |lhs_fixed| self.new_float(@as(Float, @floatFromInt(lhs_fixed)) + rhs_float),
|
||||||
.float => |lhs_float| self.new_float(lhs_float + lhs_float),
|
.float => |lhs_float| self.new_float(lhs_float + rhs_float),
|
||||||
.vector2 => |lhs_vector2| self.new_vector2(lhs_vector2.scalar_added(@floatCast(rhs_float))),
|
.vector2 => |lhs_vector2| self.new_vector2(lhs_vector2.scalar_added(@floatCast(rhs_float))),
|
||||||
.vector3 => |lhs_vector3| self.new_vector3(lhs_vector3.scalar_added(@floatCast(rhs_float))),
|
.vector3 => |lhs_vector3| self.new_vector3(lhs_vector3.scalar_added(@floatCast(rhs_float))),
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue