Created
September 7, 2017 10:52
-
-
Save njlr/ce12d64d79f8c4d7bf1ac5a045417dfd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public final class Vector3 { | |
| public final float x; | |
| public final float y; | |
| public final float z; | |
| public Vector3(float x, float y, float z) { | |
| this.x = x; | |
| this.y = y; | |
| this.z = z; | |
| } | |
| public Vector3 add(final Vector3 v) { | |
| return new Vector2(x + v.x, y + v.y, z + v.z); | |
| } | |
| // toString, hashCode, equals... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like there is a typo, at L14. Vector2 -> Vector3