- double nUnit;
- uint16_ iDegree;
-
- pSpotLight->nDegreeCount = get_integer_resource( "degrees", "Integer" );
- if( pSpotLight->nDegreeCount < 180 ) pSpotLight->nDegreeCount = 180; /* Less than 180 will show trails in higher resolutions. */
-#ifdef VERBOSE
- printf( "%s: Using a %d degree circle.\n", progclass, pSpotLight->nDegreeCount );
-#endif
-
- pSpotLight->aSinTable = calloc( pSpotLight->nDegreeCount, sizeof(double) );
-
- /* This funtion builds the Sine Lookup Tables. */
- nUnit = (double)( PI * 2.0F ) / (double)( pSpotLight->nDegreeCount );
-
- for( iDegree=0; iDegree<pSpotLight->nDegreeCount; iDegree++)
- pSpotLight->aSinTable[ iDegree ] = sin( nUnit * (double)iDegree );
-}