mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-18 13:49:59 +01:00
WIP wren/core: Add DEF_NUM_CONSTANT (with Num::infinity and Num::nan). (#781)
* wren/vm: Add "wren_math.h". * wren/core: Add DEF_NUM_CONSTANT. * wren/core: Add `Num::infinity` constant. * wren/core: Add `Num::nan` constant.
This commit is contained in:
@ -9,6 +9,16 @@ Attempts to parse `value` as a decimal literal and return it as an instance of
|
||||
|
||||
It is a runtime error if `value` is not a string.
|
||||
|
||||
### Num.**infinity**
|
||||
|
||||
The value of &infinity;.
|
||||
|
||||
### Num.**nan**
|
||||
|
||||
One value representing a NaN.
|
||||
|
||||
Provides a default sane NaN number suitable for the vm internal values.
|
||||
|
||||
### Num.**pi**
|
||||
|
||||
The value of π.
|
||||
|
||||
Reference in New Issue
Block a user