mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Aded operators to create numerics
This commit is contained in:
parent
49ffb4f276
commit
86c7bd2877
@ -151,6 +151,11 @@ namespace Artemis.Core
|
|||||||
return (byte)Math.Clamp(p._value, 0, 255);
|
return (byte)Math.Clamp(p._value, 0, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static implicit operator Numeric(double d) => new(d);
|
||||||
|
public static implicit operator Numeric(float f) => new(f);
|
||||||
|
public static implicit operator Numeric(int i) => new(i);
|
||||||
|
public static implicit operator Numeric(byte b) => new(b);
|
||||||
|
|
||||||
public static bool operator >(Numeric a, Numeric b)
|
public static bool operator >(Numeric a, Numeric b)
|
||||||
{
|
{
|
||||||
return a._value > b._value;
|
return a._value > b._value;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user