mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Add Num.withoutDecimalPoint
This commit is contained in:
parent
62cc19c64b
commit
9c664172dd
9 changed files with 25 additions and 4 deletions
|
@ -150,6 +150,8 @@ interface Num
|
|||
toF32Checked,
|
||||
toF64,
|
||||
toF64Checked,
|
||||
withoutDecimalPoint,
|
||||
# withDecimalPoint
|
||||
]
|
||||
imports [
|
||||
Bool.{ Bool },
|
||||
|
@ -1406,3 +1408,10 @@ toU64Checked : Int * -> Result U64 [OutOfBounds]
|
|||
toU128Checked : Int * -> Result U128 [OutOfBounds]
|
||||
toF32Checked : Num * -> Result F32 [OutOfBounds]
|
||||
toF64Checked : Num * -> Result F64 [OutOfBounds]
|
||||
|
||||
|
||||
## Turns a [Dec] into its [I128] representation, effectifely removing the decimal point.
|
||||
withoutDecimalPoint : Dec -> I128
|
||||
|
||||
## Turns a [I128] into the coresponding [Dec], effectifely addoing the decimal point.
|
||||
#withDecimalPoint : I128 -> Dec
|
Loading…
Add table
Add a link
Reference in a new issue