| 127 | #define TestLog(args...) emscripten_log(EM_LOG_CONSOLE, args) |
| 128 | |
| 129 | void PrintDoubleStuff(double first, double second) { |
| 130 | double divided = first / second; |
| 131 | |
| 132 | TestLog("%f %f %f\n", first, second, divided); |
| 133 | TestLog("%d %d %d\n", (int)(first * 1000000), (int)(second * 1000000), (int)(divided * 1000000)); |
| 134 | TestLog("%f %d %d\n", first, (int)(second * 1000000), (int)(divided * 1000000)); |
| 135 | TestLog("%d %f %d\n", (int)(first * 1000000), second, (int)(divided * 1000000)); |
| 136 | TestLog("%d %d %f\n", (int)(first * 1000000), (int)(second * 1000000), divided); |
| 137 | TestLog("%d %f %f\n", (int)(first * 1000000), second, divided); |
| 138 | TestLog("%f %d %f\n", first, (int)(second * 1000000), divided); |
| 139 | TestLog("%f %f %d\n", first, second, (int)(divided * 1000000)); |
| 140 | } |
| 141 | |
| 142 | void DoubleTest() { |
| 143 | PrintDoubleStuff(12.3456789, 9.12345678); |