public float2 ReadFloat2( string _block )
{
Parser P = new Parser( _block );
float2 Result = new float2();
int coordinateIndex = 0;
while ( P.OK ) {
float value = P.ReadFloat();
P.ReadString(); // Skip separator
switch ( coordinateIndex ) {
case 0: Result.x = value; break;
case 1: Result.y = value; break;
default: Error( "Unexpected coordinate!" ); break;
}
coordinateIndex++;
}
return Result;
}
Parser::ReadFloat2 ( ) : float2 |