|
// Start the table
printf( "const double g_rdLookup_Sqrt[] = \r\n{\r\n\t" );
// Generate items
for ( int i = 0; i < 1000; i++ )
{
// Add value separator
if ( i ) printf( ", " );
// Break into reasonable pieces
if ( i && !( i % 8 ) ) printf( "\r\n\t" );
// Calculate value
printf( "%g", (double)sqrt( (double)i ) );
}
// Complete the table
printf( "\r\n};" );
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.