Advertisement
quantumech

Untitled

Apr 23rd, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include <emscripten/bind.h>
  2. #include <iostream>
  3.  
  4. using namespace emscripten;
  5.  
  6. // Define constant being exposed
  7. const double PI = 3.141592653589793238463;
  8.  
  9. // Expose PI constant to JS
  10. EMSCRIPTEN_BINDINGS(Module)
  11. {
  12.     constant("PI", PI);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement