mach: simplify sign function & improve self-hosted compiler support
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
adfec5c930
commit
28fb75c7eb
1 changed files with 1 additions and 4 deletions
|
|
@ -232,10 +232,7 @@ pub const Platform = struct {
|
|||
}
|
||||
|
||||
inline fn sign(val: f64) f64 {
|
||||
return switch (val) {
|
||||
0.0 => 0.0,
|
||||
else => -val,
|
||||
};
|
||||
return if (val == 0.0) 0.0 else -val;
|
||||
}
|
||||
|
||||
fn toMachButton(button: i32) enums.MouseButton {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue