added missing constants
This commit is contained in:
39
src/mmath/constant.nim
Normal file
39
src/mmath/constant.nim
Normal file
@@ -0,0 +1,39 @@
|
||||
proc one*[T : int64](_: type[T]) : T = 1.T
|
||||
|
||||
proc zero*[T : int64](_: type[T]) : T = 0.T
|
||||
|
||||
proc one*[T : uint64](_: type[T]) : T = 1.T
|
||||
|
||||
proc zero*[T : uint64](_: type[T]) : T = 0.T
|
||||
|
||||
proc one*[T : int](_: type[T]) : T = 1.T
|
||||
|
||||
proc zero*[T : int](_: type[T]) : T = 0.T
|
||||
|
||||
proc one*[T : uint](_: type[T]) : T = 1.T
|
||||
|
||||
proc zero*[T : uint](_: type[T]) : T = 0.T
|
||||
|
||||
proc one*[T : int16](_: type[T]) : T = 1.T
|
||||
|
||||
proc zero*[T : int16](_: type[T]) : T = 0.T
|
||||
|
||||
proc one*[T : uint16](_: type[T]) : T = 1.T
|
||||
|
||||
proc zero*[T : uint16](_: type[T]) : T = 0.T
|
||||
|
||||
proc one*[T : int8](_: type[T]) : T = 1.T
|
||||
|
||||
proc zero*[T : int8](_: type[T]) : T = 0.T
|
||||
|
||||
proc one*[T : uint8](_: type[T]) : T = 1.T
|
||||
|
||||
proc zero*[T : uint8](_: type[T]) : T = 0.T
|
||||
|
||||
proc one*[T : float32](_: type[T]) : T = 1.T
|
||||
|
||||
proc zero*[T : float32](_: type[T]) : T = 0.T
|
||||
|
||||
proc one*[T : float64](_: type[T]) : T = 1.T
|
||||
|
||||
proc zero*[T : float64](_: type[T]) : T = 0.T
|
Reference in New Issue
Block a user