MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / Vec3

Class Vec3

src/main/java/field/linalg/Vec3.java:48–1918  ·  view source on GitHub ↗

Contains the definition of a Vector comprising 3 doubles and associated transformations. @author Richard Greenlees @author Kai Burjack with modifications and additions for Field

Source from the content-addressed store, hash-verified

46 * with modifications and additions for Field
47 */
48@SafeToToString
49public class Vec3 implements Externalizable, Supplier<Vec3>, Mutable, Serializable_safe, OverloadedMath {
50
51 private static final long serialVersionUID = 1L;
52
53 /**
54 * The x component of the vector.
55 */
56 public double x;
57 /**
58 * The y component of the vector.
59 */
60 public double y;
61 /**
62 * The z component of the vector.
63 */
64 public double z;
65
66 /**
67 * Create a new {@link Vec3} with all components set to zero.
68 */
69 public Vec3() {
70 }
71
72 /**
73 * Create a new {@link Vec3} and initialize all three components with the given value.
74 *
75 * @param d the value of all three components
76 */
77 public Vec3(double d) {
78 this(d, d, d);
79 }
80
81 /**
82 * Create a new {@link Vec3} with the given component values.
83 *
84 * @param x the value of x
85 * @param y the value of y
86 * @param z the value of z
87 */
88 public Vec3(double x, double y, double z) {
89 this.x = x;
90 this.y = y;
91 this.z = z;
92 }
93 /**
94 * Create a new {@link Vec3} with the given component values.
95 *
96 * @param x the value of x
97 * @param y the value of y
98 * @param z the value of z
99 */
100 public Vec3(float x, float y, float z) {
101 this.x = x;
102 this.y = y;
103 this.z = z;
104 }
105

Callers 15

toVec3Method · 0.70
translateMethod · 0.70
toVec3Method · 0.70
closeOnMethod · 0.50
dispatchTextMethod · 0.50
__MINUS__Method · 0.50
__PLUS__Method · 0.50
__MULTIPLY__Method · 0.50
__DIVIDE__Method · 0.50
__XOR__Method · 0.50
MocapClass · 0.50
rotateMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected