Search Results for

    Show / Hide Table of Contents

    Class AxisMath

    Abstract class for some math shortcuts used around the code

    Inheritance
    object
    AxisMath
    Namespace: Axis
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class AxisMath

    Fields

    Deg2Rad

    Constant floats for angle handling

    Declaration
    public const float Deg2Rad = 0.01745329
    Field Value
    Type Description
    float

    Rad180

    Constant floats for angle handling

    Declaration
    public const float Rad180 = 3.1415927
    Field Value
    Type Description
    float

    Rad270

    Constant floats for angle handling

    Declaration
    public const float Rad270 = 4.712389
    Field Value
    Type Description
    float

    Rad2Deg

    Constant floats for angle handling

    Declaration
    public const float Rad2Deg = 57.29578
    Field Value
    Type Description
    float

    Rad360

    Constant floats for angle handling

    Declaration
    public const float Rad360 = 6.2831855
    Field Value
    Type Description
    float

    Rad45

    Constant floats for angle handling

    Declaration
    public const float Rad45 = 0.7853982
    Field Value
    Type Description
    float

    Rad90

    Constant floats for angle handling

    Declaration
    public const float Rad90 = 1.5707964
    Field Value
    Type Description
    float

    Methods

    CompareFixed(float, int, int)

    Compares given float fixed to another int

    Declaration
    public static int CompareFixed(float n1, int n2, int point = 4)
    Parameters
    Type Name Description
    float n1

    Given float

    int n2

    Another int

    int point

    fixed point for comparison

    Returns
    Type Description
    int

    equal=0, n1>n2=1 n1<n2=-1

    Remarks

    Warning: Points outside 1-6 range are invalid

    CompareFixed(float, float, int)

    Compares given float fixed to another float fixed

    Declaration
    public static int CompareFixed(float n1, float n2, int point = 4)
    Parameters
    Type Name Description
    float n1

    Given float

    float n2

    Another float

    int point

    fixed point for comparison

    Returns
    Type Description
    int

    equal=0, n1>n2=1 n1<n2=-1

    Remarks

    Warning: Points outside 1-6 range are invalid

    EqualsFixed(float, int, int)

    Wether given float fixed is equals to another int

    Declaration
    public static bool EqualsFixed(float n1, int n2, int point = 4)
    Parameters
    Type Name Description
    float n1

    Given float

    int n2

    Another int

    int point

    fixed point for comparison

    Returns
    Type Description
    bool

    Are them equal? true else false

    Remarks

    Warning: Points outside 1-6 range are invalid

    EqualsFixed(float, float, int)

    Wether given float fixed is equals to another float

    Declaration
    public static bool EqualsFixed(float n1, float n2, int point = 4)
    Parameters
    Type Name Description
    float n1

    Given float

    float n2

    Another float

    int point

    fixed point for comparison

    Returns
    Type Description
    bool

    Are them equal? true else false

    Remarks

    Warning: Points outside 1-6 range are invalid

    ToFixed(float, int)

    Turns a given float number to a fixed point

    Declaration
    public static float ToFixed(float n1, int point = 4)
    Parameters
    Type Name Description
    float n1

    Given float

    int point

    Fixed point to return

    Returns
    Type Description
    float

    Float fixed

    Remarks

    Warning: Points outside 1-6 range are invalid

    VectorZero(Vector2, int)

    Wether given vector2 sqrMagnitude fixed is 0

    Declaration
    public static bool VectorZero(Vector2 v, int point = 4)
    Parameters
    Type Name Description
    Vector2 v

    Given vector2

    int point

    fixed point for comparison

    Returns
    Type Description
    bool

    Is it zero? true else false

    Remarks

    Warning: Points outside 1-6 range are invalid

    VectorZero(Vector3, int)

    Wether given vector3 sqrMagnitude fixed is 0

    Declaration
    public static bool VectorZero(Vector3 v, int point = 4)
    Parameters
    Type Name Description
    Vector3 v

    Given vector3

    int point

    fixed point for comparison

    Returns
    Type Description
    bool

    Is it zero? true else false

    Remarks

    Warning: Points outside 1-6 range are invalid

    In This Article
    Back to top Axis 1.0.0