Table of Contents

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 T

The value to clamp.

min T

The minimum value.

max T

The maximum value.

Returns

T

The clamped value.

Type Parameters

T

The type of the value.