Operations<T>.MinNumber Method

Returns the smallest of two numbers, preferring a number over NaN.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.7.0
C#
public static T MinNumber(
	T a,
	T b
)

Parameters

a  T
 
b  T
 

Return Value

T

Remarks

If exactly one operand is NaN, this method returns the numeric operand. If both operands are NaN, this method returns NaN.

For floating-point values, this method implements IEEE 754-2019 minimumNumber semantics. For zero ties, it returns negative zero when either operand is negative zero.

See Also