-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Velocity2D.java and Velocity3D.java as wrapper classes for Vect…
…or2 and Vector3 from LibGDX
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/main/java/de/kleesup/libraries/gamebase/shared/math/Velocity2D.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package de.kleesup.libraries.gamebase.shared.math; | ||
|
||
import com.badlogic.gdx.math.Vector2; | ||
|
||
/** | ||
* A wrapper class of {@link Vector2} from LibGDX. | ||
* <br>Created on 30.01.2023</br> | ||
* @author KleeSup | ||
* @version 1.0 | ||
* @since 1.1.3 | ||
*/ | ||
public class Velocity2D extends Vector2 { | ||
|
||
public Velocity2D() { | ||
} | ||
|
||
public Velocity2D(float x, float y) { | ||
super(x, y); | ||
} | ||
|
||
public Velocity2D(Vector2 v) { | ||
super(v); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/de/kleesup/libraries/gamebase/shared/math/Velocity3D.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package de.kleesup.libraries.gamebase.shared.math; | ||
|
||
import com.badlogic.gdx.math.Vector2; | ||
import com.badlogic.gdx.math.Vector3; | ||
|
||
/** | ||
* A wrapper class of {@link Vector3} from LibGDX. | ||
* <br>Created on 30.01.2023</br> | ||
* @author KleeSup | ||
* @version 1.0 | ||
* @since 1.1.3 | ||
*/ | ||
public class Velocity3D extends Vector3 { | ||
|
||
public Velocity3D() { | ||
} | ||
|
||
public Velocity3D(float x, float y, float z) { | ||
super(x, y, z); | ||
} | ||
|
||
public Velocity3D(Vector3 vector) { | ||
super(vector); | ||
} | ||
|
||
public Velocity3D(float[] values) { | ||
super(values); | ||
} | ||
|
||
public Velocity3D(Vector2 vector, float z) { | ||
super(vector, z); | ||
} | ||
} |