Gets a new midpoint vector between this vector and another. @param other The other vector @return a new midpoint vector
(@NotNull Vector other)
| 229 | * @return a new midpoint vector |
| 230 | */ |
| 231 | @NotNull |
| 232 | public Vector getMidpoint(@NotNull Vector other) { |
| 233 | double x = (this.x + other.x) / 2; |
| 234 | double y = (this.y + other.y) / 2; |
| 235 | double z = (this.z + other.z) / 2; |
| 236 | return new Vector(x, y, z); |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * Performs scalar multiplication, multiplying all components with a |
nothing calls this directly
no outgoing calls
no test coverage detected