haku2: fix implementation of / (div)
it was multiplying instead of dividing
This commit is contained in:
parent
667eef136e
commit
45c954cb03
1 changed files with 3 additions and 3 deletions
|
@ -320,9 +320,9 @@ fn div(a: Value, b: Value, cx: Context) Vm.Error!Value {
|
|||
}
|
||||
|
||||
return switch (a) {
|
||||
.number => .{ .number = a.number * b.number },
|
||||
.vec4 => .{ .vec4 = a.vec4 * b.vec4 },
|
||||
.rgba => .{ .rgba = a.rgba * b.rgba },
|
||||
.number => .{ .number = a.number / b.number },
|
||||
.vec4 => .{ .vec4 = a.vec4 / b.vec4 },
|
||||
.rgba => .{ .rgba = a.rgba / b.rgba },
|
||||
else => cx.vm.throw("number, vec4, or rgba arguments expected, but got {s}", .{a.typeName()}),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue