|
EuclideanWrap Method
|
Wraps a value to a range of values defined
by the given minimum value and range.
Namespace: GSF.NumericalAnalysisAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.258-beta+f8b6aa3dbfe0b4cc2b0b0760dd5d2a3dd4f59d09
Syntaxpublic static double Wrap(
double value,
double minimum,
double range
)
Public Shared Function Wrap (
value As Double,
minimum As Double,
range As Double
) As Double
public:
static double Wrap(
double value,
double minimum,
double range
)
static member Wrap :
value : float *
minimum : float *
range : float -> float GSF.NumericalAnalysis.Euclidean.Wrap = function(value, minimum, range);
View SourceParameters
- value Double
- The value to be wrapped.
- minimum Double
- The minimum value of the range.
- range Double
- The size of the range.
Return Value
DoubleThe given value wrapped to the given range.
Remarks
This method wraps the given value based on the assumption that
for every pair of values x and y where x-y=range, the values are
equivalent. This is probably most widely understood in terms of
angles, where 0, 360, 720, etc. are all equivalent angles. If
you wanted to wrap an angle such that it is between 120 and 480,
for instance, you could call Euclidean.Wrap(angle, 120, 360).
See Also