Click or drag to resize
AB4D logo

ExtensionsSaturate(Color4) Method

Ensures that the color components are within 0 and 1 - if smaller than 0 than the value is set to 0; if bigger than 1 the value is set to 1. This is the same as saturate function in HLSL.

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.0.8865.1045
Syntax
C#
public static Color4 Saturate(
	this Color4 color
)

Parameters

color  Color4
 

Return Value

Color4

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Color4. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also