mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class MathExtensions

    Extension methods and helper functions for various math data

    Inheritance
    Object
    MathExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit
    Assembly: cs.temp.dll.dll
    Syntax
    public static class MathExtensions

    Methods

    ClampComponentWise(Vector3, Vector3, Vector3)

    Declaration
    public static Vector3 ClampComponentWise(Vector3 value, Vector3 min, Vector3 max)
    Parameters
    Type Name Description
    Vector3 value
    Vector3 min
    Vector3 max
    Returns
    Type Description
    Vector3

    ClampComponentWise(Vector3, Vector3, Vector3)

    Declaration
    public static Vector3 ClampComponentWise(Vector3 value, Vector3 min, Vector3 max)
    Parameters
    Type Name Description
    Vector3 value
    Vector3 min
    Vector3 max
    Returns
    Type Description
    Vector3

    CubicToLinearIndex(Vector3Int, Vector3Int)

    Declaration
    public static int CubicToLinearIndex(Vector3Int ndx, Vector3Int size)
    Parameters
    Type Name Description
    Vector3Int ndx
    Vector3Int size
    Returns
    Type Description
    Int32

    CubicToLinearIndex(Vector3Int, Vector3Int)

    Declaration
    public static int CubicToLinearIndex(Vector3Int ndx, Vector3Int size)
    Parameters
    Type Name Description
    Vector3Int ndx
    Vector3Int size
    Returns
    Type Description
    Int32

    LinearToCubicIndex(Int32, Vector3Int)

    Declaration
    public static Vector3Int LinearToCubicIndex(int linearIndex, Vector3Int size)
    Parameters
    Type Name Description
    Int32 linearIndex
    Vector3Int size
    Returns
    Type Description
    Vector3Int

    LinearToCubicIndex(Int32, Vector3Int)

    Declaration
    public static Vector3Int LinearToCubicIndex(int linearIndex, Vector3Int size)
    Parameters
    Type Name Description
    Int32 linearIndex
    Vector3Int size
    Returns
    Type Description
    Vector3Int

    MostSignificantBit(Int32)

    Declaration
    public static int MostSignificantBit(this int x)
    Parameters
    Type Name Description
    Int32 x
    Returns
    Type Description
    Int32

    MostSignificantBit(Int32)

    Declaration
    public static int MostSignificantBit(this int x)
    Parameters
    Type Name Description
    Int32 x
    Returns
    Type Description
    Int32

    PowerOfTwoGreaterThanOrEqualTo(Int32)

    Declaration
    public static int PowerOfTwoGreaterThanOrEqualTo(this int v)
    Parameters
    Type Name Description
    Int32 v
    Returns
    Type Description
    Int32

    PowerOfTwoGreaterThanOrEqualTo(Int32)

    Declaration
    public static int PowerOfTwoGreaterThanOrEqualTo(this int v)
    Parameters
    Type Name Description
    Int32 v
    Returns
    Type Description
    Int32

    PowerOfTwoGreaterThanOrEqualTo(Vector3Int)

    Declaration
    public static Vector3Int PowerOfTwoGreaterThanOrEqualTo(this Vector3Int v)
    Parameters
    Type Name Description
    Vector3Int v
    Returns
    Type Description
    Vector3Int

    PowerOfTwoGreaterThanOrEqualTo(Vector3Int)

    Declaration
    public static Vector3Int PowerOfTwoGreaterThanOrEqualTo(this Vector3Int v)
    Parameters
    Type Name Description
    Vector3Int v
    Returns
    Type Description
    Vector3Int

    ResetIfGreaterThan(Int32, Int32)

    Sets the value to zero if greater than the specified amount.

    Declaration
    public static int ResetIfGreaterThan(this int value, int amount)
    Parameters
    Type Name Description
    Int32 value
    Int32 amount
    Returns
    Type Description
    Int32

    ResetIfGreaterThan(Int32, Int32)

    Sets the value to zero if greater than the specified amount.

    Declaration
    public static int ResetIfGreaterThan(this int value, int amount)
    Parameters
    Type Name Description
    Int32 value
    Int32 amount
    Returns
    Type Description
    Int32
    In This Article
    • Methods
      • ClampComponentWise(Vector3, Vector3, Vector3)
      • ClampComponentWise(Vector3, Vector3, Vector3)
      • CubicToLinearIndex(Vector3Int, Vector3Int)
      • CubicToLinearIndex(Vector3Int, Vector3Int)
      • LinearToCubicIndex(Int32, Vector3Int)
      • LinearToCubicIndex(Int32, Vector3Int)
      • MostSignificantBit(Int32)
      • MostSignificantBit(Int32)
      • PowerOfTwoGreaterThanOrEqualTo(Int32)
      • PowerOfTwoGreaterThanOrEqualTo(Int32)
      • PowerOfTwoGreaterThanOrEqualTo(Vector3Int)
      • PowerOfTwoGreaterThanOrEqualTo(Vector3Int)
      • ResetIfGreaterThan(Int32, Int32)
      • ResetIfGreaterThan(Int32, Int32)
    Back to top Generated by DocFX