Читати англійською Редагувати

Поділитися через


MathExtensions Class

Definition

Extension methods and helper functions for various math data

C++
public ref class MathExtensions abstract sealed
Inheritance
MathExtensions

Methods

ClampComponentWise(Vector3, Vector3, Vector3)

Preform a component wise clamp on a given vector. Each input component will be clamped by its corresponding minimum and maximum component as specified by the min and max input vectors.

CubicToLinearIndex(Vector3Int, Vector3Int)

Convert a 3D texture's cubic index to its linear representation.

LinearToCubicIndex(Int32, Vector3Int)

Convert a 3D texture's linear index to its cubic representation.

MostSignificantBit(Int32)

Get the most significant bit from the input value.

PowerOfTwoGreaterThanOrEqualTo(Int32)

Get the value that is the next power of two at or after the input value.

PowerOfTwoGreaterThanOrEqualTo(Vector3Int)

For each component in a Vector3Int, get the component value that is the next power of two at or after the input component value.

ResetIfGreaterThan(Int32, Int32)

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

Applies to

Продукт Версії
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0