parent
e6cbf9e790
commit
77166ba795
1 changed files with 6 additions and 4 deletions
|
|
@ -1799,14 +1799,16 @@ proc toBiggestFloat*(i: BiggestInt): BiggestFloat {.
|
||||||
proc toInt*(f: float): int {.
|
proc toInt*(f: float): int {.
|
||||||
magic: "ToInt", noSideEffect, importc: "toInt".}
|
magic: "ToInt", noSideEffect, importc: "toInt".}
|
||||||
## converts a floating point number `f` into an ``int``. Conversion
|
## converts a floating point number `f` into an ``int``. Conversion
|
||||||
## rounds `f` if it does not contain an integer value. If the conversion
|
## rounds `f` if it does not contain an integer value.
|
||||||
## fails (because `f` is infinite for example), `ValueError` is raised.
|
## Note that some floating point numbers (e.g. infinity) cannot be
|
||||||
|
## accurately converted.
|
||||||
|
|
||||||
proc toBiggestInt*(f: BiggestFloat): BiggestInt {.
|
proc toBiggestInt*(f: BiggestFloat): BiggestInt {.
|
||||||
magic: "ToBiggestInt", noSideEffect, importc: "toBiggestInt".}
|
magic: "ToBiggestInt", noSideEffect, importc: "toBiggestInt".}
|
||||||
## converts a biggestfloat `f` into a ``biggestint``. Conversion
|
## converts a biggestfloat `f` into a ``biggestint``. Conversion
|
||||||
## rounds `f` if it does not contain an integer value. If the conversion
|
## rounds `f` if it does not contain an integer value.
|
||||||
## fails (because `f` is infinite for example), `ValueError` is raised.
|
## Note that some floating point numbers (e.g. infinity) cannot be
|
||||||
|
## accurately converted.
|
||||||
|
|
||||||
proc addQuitProc*(quitProc: proc() {.noconv.}) {.
|
proc addQuitProc*(quitProc: proc() {.noconv.}) {.
|
||||||
importc: "atexit", header: "<stdlib.h>".}
|
importc: "atexit", header: "<stdlib.h>".}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue