MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / PrintDoubleStuff

Function PrintDoubleStuff

test/test_emscripten_log.cpp:129–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127#define TestLog(args...) emscripten_log(EM_LOG_CONSOLE, args)
128
129void 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
142void DoubleTest() {
143 PrintDoubleStuff(12.3456789, 9.12345678);

Callers 1

DoubleTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected