ColorSpaceHelperToUInt16(Single) Method

Converts a floating-point value ranging from 0 to 1 to a UInt16 without changing the color space. Out-of-range values are allowed in which case the result will be clipped to UInt16.MinValue or UInt16.MaxValue.

Definition

Namespace: KGySoft.Drawing.Imaging
Assembly: KGySoft.Drawing.Core (in KGySoft.Drawing.Core.dll) Version: 10.0.1
C#
[CLSCompliantAttribute(false)]
public static ushort ToUInt16(
	float value
)

Parameters

value  Single
The value to convert.

Return Value

UInt16
The result of the conversion.

See Also