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
value
TThe value to clamp.
min
TThe minimum value.
max
TThe maximum value.
Returns
- T
The clamped value.
Type Parameters
T
The type of the value.