Contains the definition of a Vector comprising 3 doubles and associated transformations. @author Richard Greenlees @author Kai Burjack with modifications and additions for Field
| 46 | * with modifications and additions for Field |
| 47 | */ |
| 48 | @SafeToToString |
| 49 | public 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 |
no outgoing calls
no test coverage detected