Search Results for

    Show / Hide Table of Contents

    Class Range

    Some simple logic to pick a value from a range.

    Inheritance
    System.Object
    Range
    Namespace: GDX.Mathematics
    Syntax
    public static class Range

    Methods

    | Improve this Doc View Source

    GetDouble(Double, Double, Double)

    Returns the System.Double between minValue and maxValue range at percent.

    Declaration
    public static double GetDouble(double percent, double minValue = -1.7976931348623157E+308, double maxValue = 1.7976931348623157E+308)
    Parameters
    Type Name Description
    System.Double percent

    The percentage (0-1) used to find a value in the range provided.

    System.Double minValue

    The lowest possible value.

    System.Double maxValue

    The highest possible value.

    Returns
    Type Description
    System.Double

    A System.Double value.

    | Improve this Doc View Source

    GetInteger(Double, Int32, Int32)

    Returns the System.Int32 between minValue and maxValue range at percent.

    Declaration
    public static int GetInteger(double percent, int minValue = -2147483648, int maxValue = 2147483647)
    Parameters
    Type Name Description
    System.Double percent

    The percentage (0-1) used to find a value in the range provided.

    System.Int32 minValue

    The lowest possible value.

    System.Int32 maxValue

    The highest possible value.

    Returns
    Type Description
    System.Int32

    The System.Int32 value.

    | Improve this Doc View Source

    GetSingle(Double, Single, Single)

    Returns the System.Single between minValue and maxValue range at percent.

    Declaration
    public static float GetSingle(double percent, float minValue = -3.40282347E+38F, float maxValue = 3.40282347E+38F)
    Parameters
    Type Name Description
    System.Double percent

    The percentage (0-1) used to find a value in the range provided.

    System.Single minValue

    The lowest possible value.

    System.Single maxValue

    The highest possible value.

    Returns
    Type Description
    System.Single

    A System.Single value.

    | Improve this Doc View Source

    GetUnsignedInteger(Double, UInt32, UInt32)

    Returns the System.UInt32 between minValue and maxValue range at percent.

    Declaration
    public static uint GetUnsignedInteger(double percent, uint minValue = 0U, uint maxValue = 4294967295U)
    Parameters
    Type Name Description
    System.Double percent

    The percentage (0-1) used to find a value in the range provided.

    System.UInt32 minValue

    The lowest possible value.

    System.UInt32 maxValue

    The highest possible value.

    Returns
    Type Description
    System.UInt32

    A System.UInt32 value.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Built on 2024-01-01 against 1f69a68.
    Generated by Dox+DocFX.