Search Results for

    Show / Hide Table of Contents

    Class MathExtensions

    Extension methods for certain math operations.

    Inheritance
    System.Object
    MathExtensions
    Namespace: Microsoft.Psi
    Assembly: Microsoft.Psi.dll
    Syntax
    public static class MathExtensions : object

    Methods

    View Source

    Max(IEnumerable<Double>)

    Returns the maximum value in a sequence of double values.

    Declaration
    public static double Max(IEnumerable<double> source)
    Parameters
    Type Name Description
    IEnumerable<System.Double> source

    A sequence of double values to determine the maximum value of.

    Returns
    Type Description
    System.Double

    The maximum value in the sequence.

    Remarks

    A sequence containing one or more NaN values will return a maximum value of NaN. An empty sequence will throw an InvalidOperationException.

    View Source

    Max(IEnumerable<Nullable<Double>>)

    Returns the maximum value in a sequence of nullable double values.

    Declaration
    public static double? Max(IEnumerable<double?> source)
    Parameters
    Type Name Description
    IEnumerable<System.Nullable<System.Double>> source

    A sequence of nullable double values to determine the maximum value of.

    Returns
    Type Description
    System.Nullable<System.Double>

    The maximum value in the sequence.

    Remarks

    A sequence containing one or more NaN values will return a maximum value of NaN. Null values in the sequence are ignored. An empty sequence will return null.

    View Source

    Max(IEnumerable<Nullable<Single>>)

    Returns the maximum value in a sequence of nullable float values.

    Declaration
    public static float? Max(IEnumerable<float?> source)
    Parameters
    Type Name Description
    IEnumerable<System.Nullable<System.Single>> source

    A sequence of nullable float values to determine the maximum value of.

    Returns
    Type Description
    System.Nullable<System.Single>

    The maximum value in the sequence.

    Remarks

    A sequence containing one or more NaN values will return a maximum value of NaN. Null values in the sequence are ignored. An empty sequence will return null.

    View Source

    Max(IEnumerable<Single>)

    Returns the maximum value in a sequence of float values.

    Declaration
    public static float Max(IEnumerable<float> source)
    Parameters
    Type Name Description
    IEnumerable<System.Single> source

    A sequence of float values to determine the maximum value of.

    Returns
    Type Description
    System.Single

    The maximum value in the sequence.

    Remarks

    A sequence containing one or more NaN values will return a maximum value of NaN. An empty sequence will throw an InvalidOperationException.

    View Source

    Min(IEnumerable<Double>)

    Returns the minimum value in a sequence of double values.

    Declaration
    public static double Min(IEnumerable<double> source)
    Parameters
    Type Name Description
    IEnumerable<System.Double> source

    A sequence of double values to determine the minimum value of.

    Returns
    Type Description
    System.Double

    The minimum value in the sequence.

    Remarks

    A sequence containing one or more NaN values will return a minimum value of NaN. An empty sequence will throw an InvalidOperationException.

    View Source

    Min(IEnumerable<Nullable<Double>>)

    Returns the minimum value in a sequence of nullable double values.

    Declaration
    public static double? Min(IEnumerable<double?> source)
    Parameters
    Type Name Description
    IEnumerable<System.Nullable<System.Double>> source

    A sequence of nullable double values to determine the minimum value of.

    Returns
    Type Description
    System.Nullable<System.Double>

    The minimum value in the sequence.

    Remarks

    A sequence containing one or more NaN values will return a minimum value of NaN. Null values in the sequence are ignored. An empty sequence will return null.

    View Source

    Min(IEnumerable<Nullable<Single>>)

    Returns the minimum value in a sequence of nullable float values.

    Declaration
    public static float? Min(IEnumerable<float?> source)
    Parameters
    Type Name Description
    IEnumerable<System.Nullable<System.Single>> source

    A sequence of nullable float values to determine the minimum value of.

    Returns
    Type Description
    System.Nullable<System.Single>

    The minimum value in the sequence.

    Remarks

    A sequence containing one or more NaN values will return a minimum value of NaN. Null values in the sequence are ignored. An empty sequence will return null.

    View Source

    Min(IEnumerable<Single>)

    Returns the minimum value in a sequence of float values.

    Declaration
    public static float Min(IEnumerable<float> source)
    Parameters
    Type Name Description
    IEnumerable<System.Single> source

    A sequence of float values to determine the minimum value of.

    Returns
    Type Description
    System.Single

    The minimum value in the sequence.

    Remarks

    A sequence containing one or more NaN values will return a minimum value of NaN. An empty sequence will throw an InvalidOperationException.

    • View Source
    In This Article
    • Methods
      • Max(IEnumerable<Double>)
      • Max(IEnumerable<Nullable<Double>>)
      • Max(IEnumerable<Nullable<Single>>)
      • Max(IEnumerable<Single>)
      • Min(IEnumerable<Double>)
      • Min(IEnumerable<Nullable<Double>>)
      • Min(IEnumerable<Nullable<Single>>)
      • Min(IEnumerable<Single>)
    Back to top Privacy & Cookies | Terms Of Use | Trademarks | © Microsoft
    Generated by DocFX