Advertisement
AzisMM

transform.js

Jul 11th, 2022
998
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function translasi(titik_lama, T) {
  2.     var x_baru = titik_lama.x + T.x;
  3.     var y_baru = titik_lama.y + T.y;
  4.  
  5.     return {x:x_baru, y:y_baru};
  6. }
  7.  
  8. function penskalaan(titik_lama, S) {
  9.     var x_baru = titik_lama.x * S.x;
  10.     var y_baru = titik_lama.y * S.y;
  11.  
  12.     return {x:x_baru, y:y_baru};
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement