mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
53808346a4
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1016 0fc631ac-6414-0410-93d0-97cfa31319b6
26 lines
572 B
Plaintext
26 lines
572 B
Plaintext
Function: to_real
|
|
|
|
DOC_MSE_VERSION: since 0.3.7
|
|
|
|
--Usage--
|
|
> to_real(any value)
|
|
|
|
Convert any value to a [[type:double]].
|
|
|
|
|
|
--Parameters--
|
|
! Parameter Type Description
|
|
| @input@ ''any type'' Value to convert to a real number
|
|
|
|
--Examples--
|
|
> to_real(1) == 1.0
|
|
> to_real("1.5") == 1.5
|
|
|
|
Use @or else@ to recover from errors:
|
|
> to_number("not a number") or else 0.0 == 0.0
|
|
> to_number("123") or else 0.0 == 123.0
|
|
|
|
--See also--
|
|
| [[fun:to_int]] Convert any value to a [[type:int]]
|
|
| [[fun:to_number]] Convert any value to a number
|