---------------------------------------------------------------------------- Public Code ----------------------------------------------------------------------------**/ ---------------------------------------------------------------------------*/
| 53 | ----------------------------------------------------------------------------**/ |
| 54 | /*---------------------------------------------------------------------------*/ |
| 55 | void InitIntegerFX() { |
| 56 | static bool atan_table_init = false; |
| 57 | atan_table_mutex.Lock(); |
| 58 | if (!atan_table_init) { |
| 59 | for (int i = 0; i < INT_CHAR_NORM_RANGE; ++i) { |
| 60 | cos_table[i] = cos(i * 2 * PI / INT_CHAR_NORM_RANGE + PI); |
| 61 | sin_table[i] = sin(i * 2 * PI / INT_CHAR_NORM_RANGE + PI); |
| 62 | } |
| 63 | atan_table_init = true; |
| 64 | } |
| 65 | atan_table_mutex.Unlock(); |
| 66 | } |
| 67 | |
| 68 | // Returns a vector representing the direction of a feature with the given |
| 69 | // theta direction in an INT_FEATURE_STRUCT. |
no test coverage detected