Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. public static void main(String[] args)
  2. {
  3. double[][] punkt = {
  4. {1},
  5. {0},
  6. {0}
  7. };
  8.  
  9. double[][] przesuniecie = {
  10. {1, 0, 2},
  11. {0, 1, 2},
  12. {0, 0, 1}
  13.  
  14. };
  15.  
  16. double[][] rezultat = new double[3][1];
  17.  
  18. for(int i = 0; i < rezultat.length; ++i){
  19. for(int index = 0; index < punkt.length; ++index){
  20. rezultat[index][0] += punkt[index][0] * przesuniecie[i][index];
  21. }
  22. }
  23.  
  24. for(double[] t : rezultat){
  25. for(double d : t) System.out.print(d + " ");
  26. System.out.println("");
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement