Vector2Extensions

Static Class in Zigurous.Math

Declaration

public static class Vector2Extensions

Description

Extension methods for Vector2.

Extension Methods

AbsReturns the absolute value of the vector.
AverageCalculates the average of the vectors.
CeilRounds the vector up to the nearest whole number.
CeiledRounds the vector up to the nearest whole number.
ClampClamps the vector to the range [min..max].
ClampedClamps the vector to the range [min..max].
FloorRounds the vector down to the nearest whole number.
FlooredRounds the vector down to the nearest whole number.
IsEqualToChecks for equality with another vector given a margin of error specified by an epsilon.
IsZeroChecks if the vector is zero given a margin of error specified by an epsilon.
RoundRounds the vector to the nearest whole number.
RoundedRounds the vector to the nearest whole number.
SetUniformSets all components of the vector to the given value.
SetUniformlySets all components of the vector to the given value.
WrapWraps the vector to the range [min..max].
WrappedWraps the vector to the range [min..max].