============= idVec3::string This is just a convenience function for printing vectors ============= */
| 129 | ============= |
| 130 | */ |
| 131 | char *idVec3::string( void ) { |
| 132 | static int index = 0; |
| 133 | static char str[ 8 ][ 36 ]; |
| 134 | char *s; |
| 135 | |
| 136 | // use an array so that multiple toString's won't collide |
| 137 | s = str[ index ]; |
| 138 | index = (index + 1)&7; |
| 139 | |
| 140 | sprintf( s, "%.2f %.2f %.2f", x, y, z ); |
| 141 | |
| 142 | return s; |
| 143 | } |