List of commits:
Subject Hash Author Date (UTC)
zwischenspeichern 4ccbb91007a83a77db702422936d7a05b6d15237 sven 2019-03-27 07:59:54
class Vector 5e896e7f5614d9b2d219ec835367d9f0e9cb4a01 ani 2019-03-01 18:37:08
initial Commit e69430bfab98d7aa5f068b4324fd27f86c996fc8 sven 2019-03-01 17:42:02
Commit 4ccbb91007a83a77db702422936d7a05b6d15237 - zwischenspeichern
Author: sven
Author date (UTC): 2019-03-27 07:59
Committer name: sven
Committer date (UTC): 2019-03-27 07:59
Parent(s): c0591a76cd0d534b4a64ab4974285c96899071ed
Signing key:
Tree: 73855bdaf3f1a54348e268993c7b80501e812cd3
File Lines added Lines deleted
src/data/Math.java 0 7
src/data/OwnMath.java 40 0
src/data/Vector.java 16 8
File src/data/Math.java deleted (index 40aa927..0000000)
1 package data;
2
3 public class Math {
4 public float[][] getRotationMatrix(float angle, int dimensions, int axis){
5 return new float[0][0];
6 }
7 }
File src/data/OwnMath.java added (mode: 100644) (index 0000000..8dd48a4)
1 package data;
2
3
4
5 public class OwnMath {
6 public float[][] getRotationMatrix(float angle, int axis){
7 float[][] mat= new float[3][3];
8 for(int i =0; i< 4;i++){
9 for (int j = 0; j < 4; j++) {
10 mat[i][j] =0;
11 }
12 }
13 switch(axis){
14 case 0:
15 mat[0][0]=1;
16 mat[1][1]=(float)Math.cos(angle);
17 mat[1][2]=(float)-Math.sin(angle);
18 mat[2][1]=(float)Math.sin(angle);
19 mat[2][2]=(float)Math.cos(angle);
20 break;
21 case 1:
22 mat[0][0]=(float)Math.cos(angle);
23 mat[0][2]=(float)Math.sin(angle);
24 mat[1][1]=1;
25 mat[2][0]=(float)-Math.sin(angle);
26 mat[2][2]=(float)Math.cos(angle);
27 break;
28 case 2:
29 mat[2][2]=1;
30 mat[0][0]=(float)Math.cos(angle);
31 mat[0][1]=(float)-Math.sin(angle);
32 mat[1][0]=(float)Math.sin(angle);
33 mat[1][1]=(float)Math.cos(angle);
34 break;
35 default:
36 mat = null;
37 }
38 return new float[0][0];
39 }
40 }
File src/data/Vector.java changed (mode: 100644) (index 644d2d9..c9845d2)
1 1 package data; package data;
2 2
3 public class Vector {
4 public int get(int index){
5 return 0;
6 }
3 import java.util.List;
4
5 public class Vector{
7 6
8 7 private int[] vector; private int[] vector;
9 8
 
... ... public class Vector {
17 16 } }
18 17 } }
19 18
20 public void add(int[] point){
21 for(int i=0; i<point.length; i++){
22 vector[i]= vector[i]+point[i];
19 public void add(Vector point){
20 int[] pointVal=point.getValues();
21 for(int i=0; i<pointVal.length; i++){
22 vector[i]= vector[i]+pointVal[i];
23 23 } }
24 24 } }
25 25
26 26 public void matrixMulti(float[][] matrix){ public void matrixMulti(float[][] matrix){
27 27
28
29
28 30 } }
31 public int[] getValues(){
32 return vector;
33 }
34
35 private List<Vector> splitMatrix(float[][] matrix){
29 36
30 }
37 }
38 }
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/SF2311/Rotation

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/SF2311/Rotation

Clone this repository using git:
git clone git://git.rocketgit.com/user/SF2311/Rotation

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main