mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-21 10:41:42 +00:00
Even more math (#56)
Remaining implementations of JavaScript's Math functions (except sin/cos/tan), both double (Math) and single (Mathf) precision, ported from musl incl. tests from libc-test, plus some changes to match JS semantics. Also binds fmod to `%` and pow to `**`.
This commit is contained in:
@ -444,6 +444,7 @@ function parse<T>(str: String, radix: i32 = 0): T {
|
||||
return sign * num;
|
||||
}
|
||||
|
||||
// FIXME: naive implementation
|
||||
export function parseFloat(str: String): f64 {
|
||||
var len: i32 = str.length;
|
||||
if (!len) {
|
||||
|
Reference in New Issue
Block a user