Class XFloatingPoint
- Namespace
- Prefrontal.Common.Extensions
- Assembly
- Prefrontal.Core.dll
Provides extension methods for floating point types.
public static class XFloatingPoint
- Inheritance
-
XFloatingPoint
- Inherited Members
Methods
Clamp<T>(T, T, T)
Clamps the value between min and max.
public static T Clamp<T>(this T value, T min, T max) where T : IFloatingPoint<T>
Parameters
valueTThe value to clamp.
minTThe minimum value.
maxTThe maximum value.
Returns
- T
The clamped value.
Type Parameters
TThe type of the value.