MCPcopy Create free account
hub / github.com/Hypejet/Jet / from

Method from

api/src/main/java/net/hypejet/jet/world/coordinate/Vector.java:34–37  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 1

synchronizeMethod · 0.95

Calls 4

createMethod · 0.95
xMethod · 0.65
yMethod · 0.65
zMethod · 0.65

Tested by

no test coverage detected