Class ValueManipulation
- Namespace
- Garyon.Functions.UnmanagedHelpers
- Assembly
- Garyon.dll
Provides functions for value manipulation.
public abstract class ValueManipulation
- Inheritance
-
ValueManipulation
- Inherited Members
- Extension Methods
Methods
Rescale<TOrigin, TTarget>(TOrigin)
Rescales a value into a different type. The returned value includes as many bytes as the target type allows from the original type, with the rest, if any, set to 0.
public static TTarget Rescale<TOrigin, TTarget>(TOrigin value) where TOrigin : unmanaged where TTarget : unmanaged
Parameters
valueTOriginThe value to rescale.
Returns
- TTarget
The resulting value.
Type Parameters
TOriginThe type of the original value.
TTargetThe target type to rescale the value into.