Advertisement
snake5

SGScript threading/math sample code

Jan 20th, 2016
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. // for http://www.sgscript.org/files/em/sgsdemo.htm
  2.  
  3. // threading
  4. function f(){ println("<<START>>"); yield; println("<<END>>"); }
  5. a = thread f();
  6. printvar(a);
  7. sa = serialize(a);
  8. printvar(sa);
  9. a = unserialize(sa);
  10. process_threads();
  11.  
  12. // [xg] math
  13. include "math";
  14. mtx = mat4().rotateY(deg2rad(90));
  15. printvar(mtx);
  16. printvar(mtx.transform_pos(vec3(1,0,0)));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement