Returns the component at the specified index as a normalized <float32> value. This value is between 0.0 and 1.0.
double GetComponentAsFloat32( int32 p_nIndex )
Parameter Type | Parameter Name | Documentation |
---|---|---|
int32 | p_nIndex | The index of the component whose value to retrieve. |
import library "app_service_console_util.ssl";
auto Color a_vuData; // (a)utomatic (v)ector of (unsigned)
a_vuData.SetComponent( 0, 255 );
a_vuData.SetComponent( 1, 128 );
a_vuData.SetComponent( 2, 64 );
a_vuData.SetComponent( 3, 255 );
Console.Out( a_vuData.GetComponentAsFloat32( 0 ) );
Console.Out( a_vuData.GetComponentAsFloat32( 1 ) );
Console.Out( a_vuData.GetComponentAsFloat32( 2 ) );
Console.Out( a_vuData.GetComponentAsFloat32( 3 ) );
1.0
0.5
0.2
1.0