mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-01 13:56:00 +02:00
Add ability to get min/max values for generic floating point
This commit is contained in:
parent
484b9716db
commit
af7ca28707
3 changed files with 23 additions and 2 deletions
|
@ -10,11 +10,14 @@ namespace System
|
|||
using System.Diagnostics;
|
||||
|
||||
#unwarn
|
||||
public struct Double : double, IFloating, ISigned, IFormattable, IHashable, ICanBeNaN, IParseable<double>
|
||||
public struct Double : double, IFloating, ISigned, IFormattable, IHashable, ICanBeNaN, IParseable<double>, IMinMaxValue<double>
|
||||
{
|
||||
public const double MinValue = -1.7976931348623157E+308;
|
||||
public const double MaxValue = 1.7976931348623157E+308;
|
||||
|
||||
public static double IMinMaxValue<double>.MinValue => MinValue;
|
||||
public static double IMinMaxValue<double>.MaxValue => MaxValue;
|
||||
|
||||
// Note Epsilon should be a double whose hex representation is 0x1
|
||||
// on little endian machines.
|
||||
public const double Epsilon = 4.9406564584124654E-324;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue