Go to the source code of this file.
|
#define | WIIMOTE_PI 3.14159265f |
|
#define | WIIUSE_ERROR(fmt, ...) fprintf(stderr, "[ERROR] " fmt "\n", ##__VA_ARGS__) |
|
#define | WIIUSE_WARNING(fmt, ...) fprintf(stderr, "[WARNING] " fmt "\n", ##__VA_ARGS__) |
|
#define | WIIUSE_INFO(fmt, ...) fprintf(stderr, "[INFO] " fmt "\n", ##__VA_ARGS__) |
|
#define | WIIUSE_DEBUG(fmt, ...) |
|
#define | WII_DEBUG(fmt, ...) |
|
#define | RAD_TO_DEGREE(r) ((r * 180.0f) / WIIMOTE_PI) |
|
#define | DEGREE_TO_RAD(d) (d * (WIIMOTE_PI / 180.0f)) |
|
#define | BIG_ENDIAN_LONG(i) (htonl(i)) |
|
#define | BIG_ENDIAN_SHORT(i) (htons(i)) |
|
#define | absf(x) ((x >= 0) ? (x) : (x * -1.0f)) |
|
#define | diff_f(x, y) ((x >= y) ? (absf(x - y)) : (absf(y - x))) |
|
◆ absf
#define absf |
( |
|
x | ) |
((x >= 0) ? (x) : (x * -1.0f)) |
◆ BIG_ENDIAN_LONG
#define BIG_ENDIAN_LONG |
( |
|
i | ) |
(htonl(i)) |
◆ BIG_ENDIAN_SHORT
#define BIG_ENDIAN_SHORT |
( |
|
i | ) |
(htons(i)) |
◆ DEGREE_TO_RAD
#define DEGREE_TO_RAD |
( |
|
d | ) |
(d * (WIIMOTE_PI / 180.0f)) |
◆ diff_f
◆ RAD_TO_DEGREE
#define RAD_TO_DEGREE |
( |
|
r | ) |
((r * 180.0f) / WIIMOTE_PI) |
◆ WII_DEBUG
#define WII_DEBUG |
( |
|
fmt, |
|
|
|
... |
|
) |
| |
Value:do { \
printf("[WDEBUG] " __FILE__ ":%i: " fmt "\n", __LINE__, ##__VA_ARGS__); \
usleep(3000000); \
} while (0)
◆ WIIMOTE_PI
#define WIIMOTE_PI 3.14159265f |
◆ WIIUSE_DEBUG
#define WIIUSE_DEBUG |
( |
|
fmt, |
|
|
|
... |
|
) |
| |
◆ WIIUSE_ERROR
#define WIIUSE_ERROR |
( |
|
fmt, |
|
|
|
... |
|
) |
| fprintf(stderr, "[ERROR] " fmt "\n", ##__VA_ARGS__) |
◆ WIIUSE_INFO
#define WIIUSE_INFO |
( |
|
fmt, |
|
|
|
... |
|
) |
| fprintf(stderr, "[INFO] " fmt "\n", ##__VA_ARGS__) |
◆ WIIUSE_WARNING
#define WIIUSE_WARNING |
( |
|
fmt, |
|
|
|
... |
|
) |
| fprintf(stderr, "[WARNING] " fmt "\n", ##__VA_ARGS__) |