Bearbeiten

Freigeben über


MathExtensions Class

Definition

Extension methods and helper functions for various math data

public ref class MathExtensions abstract sealed
public static class MathExtensions
type MathExtensions = class
Public Module MathExtensions
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