Creates a plain Vector vector using values from the specified plain Coordinate coordinate. @param coordinate the vector to create the vector from @return the created vector, or the specified coordinate if it is a vector @since 1.0
(@NonNull Coordinate<?> coordinate)
| 32 | * @since 1.0 |
| 33 | */ |
| 34 | public static @NonNull Vector from(@NonNull Coordinate<?> coordinate) { |
| 35 | if (coordinate instanceof Vector vector) return vector; |
| 36 | return create(coordinate.x(), coordinate.y(), coordinate.z()); |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * Creates a {@linkplain Vector vector} with the specified {@code X}, {@code Y} and {@code Z} axis values. |
no test coverage detected