#include <camath.h>
Static Public Member Functions | |
| static bool | compFloat (float f1, float f2, float tol=0.001) |
| Compares two float values. | |
| static float | corrAngle (float ang) |
| Corrects an angle (to the range of 0-360). | |
| static float | getAngle (float x1, float y1, float x2, float y2) |
| Returns the angle (in degrees) from one point to an other. | |
| static float | getDistance (float x1, float y1, float x2, float y2) |
| Returns the distance from one point to an other. | |
| static float | getAngleDiff (float a1, float a2) |
| Get Angle difference between _a1 and _a2 (Which angle must I add to _a1 to get _a2) All angles in degrees. | |
| static bool | getIntersection (int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2, int *ix, int *iy) |
| Calculates the intersection point of two lines. | |
| static int | getRandomNumber (int min, int max) |
| Gets a random number from 'min' to 'max'. | |
| static void | timeToString (char *string, int time) |
| Converts a time in millisecs to a string in the format <minutes>:<seconds>. | |
| bool CAMath::compFloat | ( | float | f1, | |
| float | f2, | |||
| float | tol = 0.001 | |||
| ) | [static] |
Compares two float values.
| float CAMath::corrAngle | ( | float | ang | ) | [static] |
Corrects an angle (to the range of 0-360).
| void CAMath::timeToString | ( | char * | string, | |
| int | time | |||
| ) | [static] |
Converts a time in millisecs to a string in the format <minutes>:<seconds>.
<hundredth>. (e.g. "5:02.23") 'string' must have at least place for 9 characters.
1.5.0