SHARE
TWEET

Untitled

quantumech Apr 23rd, 2019 (edited) 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <emscripten/bind.h>
  2.  
  3. // Bring Emscripten namespace into scope for the sake of readability
  4. using namespace emscripten;
  5.  
  6. // Method being exported to JS
  7. float lerp(float a, float b, float t)
  8. {
  9.     return (1 - t) * a + t * b;
  10. }
  11.  
  12. // Embind Block that registers the 'lerp()' method under the group 'Module'
  13. EMSCRIPTEN_BINDINGS(Module) {
  14.     function("lerp", &lerp);
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top