mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 06:21:29 +00:00
Improve Math#sign (#72)
This commit is contained in:
@ -6839,18 +6839,16 @@
|
||||
(br $~lib/math/NativeMath.sign|inlined.0
|
||||
(if (result f64)
|
||||
(f64.gt
|
||||
(get_local $1)
|
||||
(f64.abs
|
||||
(get_local $1)
|
||||
)
|
||||
(f64.const 0)
|
||||
)
|
||||
(f64.const 1)
|
||||
(if (result f64)
|
||||
(f64.lt
|
||||
(get_local $1)
|
||||
(f64.const 0)
|
||||
)
|
||||
(f64.const -1)
|
||||
(f64.copysign
|
||||
(f64.const 1)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user