Guest User

Untitled

a guest
Oct 17th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. //Rotate Z
  2. x = (( x * Math.cos(radz)) - (y * Math.sin(radz)));
  3. y = (( x * Math.sin(radz)) + (y * Math.cos(radz)));
  4. //Ignore Z ###############################################
  5.  
  6. //Rotate Y
  7. x = (( x * Math.cos(rady)) - (z * Math.sin(rady)));
  8. //Ignore Y ###############################################
  9. z = (( x * Math.sin(rady)) + (z * Math.cos(rady)));
  10.  
  11. //Rotate X
  12. //Ignore X ###############################################
  13. y = (( y * Math.cos(radx)) - (z * Math.sin(radx)));
  14. z = (( y * Math.sin(radx)) + (z * Math.cos(radx)));
  15.  
  16. double radx = Math.toRadians(0f);
  17. double rady = Math.toRadians(90f);
  18. double radz = Math.toRadians(0f);
  19.  
  20. double x = 1;
  21. double y = 0;
  22. double z = 0;
  23.  
  24. System.out.println(x + " " + y + " " + z);
Add Comment
Please, Sign In to add comment