diff options
author | Arne Döring <arne.doering@gmx.net> | 2018-04-15 19:59:11 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-04-15 19:59:11 +0200 |
commit | efae3668570b51fa14483663d1979a6a8a6852fe (patch) | |
tree | 6db0ac8604f30ceb67b2689b3ab37263dc225b62 /lib/system.nim | |
parent | b98cd3bf348a41778f475e835b86ab9175125789 (diff) | |
download | Nim-efae3668570b51fa14483663d1979a6a8a6852fe.tar.gz |
rename SomeReal to SomeFloat (#7617)
* rename SomeReal to SomeFloat * added changelog entry
Diffstat (limited to 'lib/system.nim')
-rw-r--r-- | lib/system.nim | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/system.nim b/lib/system.nim index 969527828..3761a35f8 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -105,12 +105,14 @@ type ## type class matching all ordinal types; however this includes enums with ## holes. - SomeReal* = float|float32|float64 + SomeFloat* = float|float32|float64 ## type class matching all floating point number types - SomeNumber* = SomeInteger|SomeReal + SomeNumber* = SomeInteger|SomeFloat ## type class matching all number types +{.deprecated: [SomeReal: SomeFloat].} + proc defined*(x: untyped): bool {.magic: "Defined", noSideEffect, compileTime.} ## Special compile-time procedure that checks whether `x` is ## defined. @@ -128,7 +130,7 @@ when defined(nimalias): TSignedInt: SomeSignedInt, TUnsignedInt: SomeUnsignedInt, TInteger: SomeInteger, - TReal: SomeReal, + TReal: SomeFloat, TNumber: SomeNumber, TOrdinal: SomeOrdinal].} @@ -2171,8 +2173,8 @@ proc max*[T](x, y: T): T = if y <= x: x else: y {.pop.} -proc high*(T: typedesc[SomeReal]): T = Inf -proc low*(T: typedesc[SomeReal]): T = NegInf +proc high*(T: typedesc[SomeFloat]): T = Inf +proc low*(T: typedesc[SomeFloat]): T = NegInf proc clamp*[T](x, a, b: T): T = ## limits the value ``x`` within the interval [a, b] |