Class MinNumber
- Namespace
- Albatross.Expression.Prefix
- Assembly
- Albatross.Expression.dll
Prefix expression that finds the minimum value among multiple numeric operands. Takes zero or more parameters and returns the smallest numeric value, or MaxValue if no operands.
public class MinNumber : PrefixExpression, IPrefixExpression, IExpression, IToken
- Inheritance
-
MinNumber
- Implements
- Inherited Members
- Extension Methods
Constructors
MinNumber()
Initializes a new instance of the MinNumber class with name "Min" and variable parameter count (minimum 0).
public MinNumber()
Methods
Run(List<object>)
Finds and returns the minimum numeric value from all operands. Each operand is converted to double before comparison. Returns MaxValue if no operands provided.
protected override object Run(List<object> operands)
Parameters
Returns
- object
The minimum numeric value as a double, or double.MaxValue if no operands.
Exceptions
- FormatException
Thrown when any operand cannot be converted to a numeric value.