https://github.com/user0332/numericalmathextensions
https://github.com/user0332/numericalmathextensions
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/user0332/numericalmathextensions
- Owner: User0332
- Created: 2023-12-14T13:23:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-26T14:32:55.000Z (about 2 years ago)
- Last Synced: 2025-03-17T18:52:15.483Z (about 1 year ago)
- Language: C#
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NumericalMathExtensions
A collection of generic math extension methods for all number types that make them more natural and easier to work with. Not yet published as a NuGet package.
Currently the extensions include:
```cs
public double INumber.ToRadians();
public double INumber.ToDegrees();
public TFloat INumber.ToRadians();
public TFloat INumber.ToDegrees();
public TCast INumber.Cast();
public double INumber.ToDouble();
public float INumber.ToFloat();
public decimal INumber.ToDecimal();
public byte INumber.ToByte();
public sbyte INumber.ToSByte();
public short INumber.ToShort();
public ushort INumber.ToUShort();
public int INumber.ToInt();
public uint INumber.ToUInt();
public long INumber.ToLong();
public ulong INumber.ToULong();
public nint INumber.ToNInt();
public nuint INumber.ToNUInt();
public BigInteger INumber.ToBigInt();
public char INumber.ToChar();
public T[] INumber.PlaceInArray();
public List INumber.PlaceInList();
public bool INumber.IsZero();
public bool INumber.IsOdd();
public bool INumber.IsEven();
public bool INumber.IsGreaterThan(T other);
public bool INumber.IsGreaterThanOrEqualTo(T other);
public bool INumber.IsLessThan(T other);
public bool INumber.IsLessThanOrEqualTo(T other);
public bool INumber.IsIntegral();
public bool INumber.IsFloating();
public bool INumber.IsNaN();
public bool INumber.IsInfinity();
public bool INumber.IsFinite();
public T INumber.Max(T other);
public T INumber.Min(T other);
public T INumber.Double();
public T INumber.Halve();
public T INumber.Increment();
public T INumber.Decrement();
public object INumber.Box();
public INumber object.UnBoxNum();
```