Search Results for

    Show / Hide Table of Contents

    Class IntegerExtensions

    Inheritance
    object
    IntegerExtensions
    Namespace: TetraCreations.Core
    Assembly: cs.temp.dll.dll
    Syntax
    public static class IntegerExtensions

    Methods

    Clamp(ref int, int, int)

    Clamp the integer reference by a minimum and a maximum value

    Declaration
    public static void Clamp(this ref int integer, int minimum, int maximum)
    Parameters
    Type Name Description
    int integer
    int minimum
    int maximum

    IsEven(int)

    Determines if the integer is even or not

    Declaration
    public static bool IsEven(this int integer)
    Parameters
    Type Name Description
    int integer
    Returns
    Type Description
    bool

    true if even, false if not.

    IsOdd(int)

    Determines if the integer is odd or not

    Declaration
    public static bool IsOdd(this int integer)
    Parameters
    Type Name Description
    int integer
    Returns
    Type Description
    bool

    true if odd, false if not.

    In This Article
    Back to top Tetra Creations documentation