Package de.linusdev.lutils.math
Class VMath
java.lang.Object
de.linusdev.lutils.math.VMath
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <V extends FloatN>
Vadd(V left, V right, V store) static @NotNull Float4x4static @NotNull Float3static floatdeterminant(@NotNull Float4x4 mat) static <V extends FloatN>
Vdivide(V left, V right, V store) static floatstatic booleanstatic booleanstatic booleanstatic booleanstatic @NotNull Float4x4static floatstatic @NotNull Float3static @NotNull Float4static <V extends FloatN>
Vmultiply(V left, V right, V store) static <V extends FloatN>
Vnormalize(V toNormalize, V store) static <M extends FloatMxN>
Mscale(M toScale, float factor, M store) static <V extends FloatN>
Vscale(V toScale, float factor, V store) static <V extends FloatN>
Vsubtract(V left, V right, V store) protected static booleanuniqueViewVector(@NotNull Vector unique, @NotNull Vector @NotNull ... vectors)
-
Method Details
-
equals
public static boolean equals(@NotNull @NotNull FloatN vector, float @NotNull [] data, float epsilon) - Parameters:
vector-FloatNdata- a vector as float arrayepsilon- the maximum difference between each component. 0.0 for true equality- Returns:
trueif the difference of each component ofvectoranddatais equal or smaller than epsilon.
-
equals
-
equals
public static boolean equals(@NotNull @NotNull FloatMxN matrix, float @NotNull [] data, float epsilon) - Parameters:
matrix-FloatMxNdata- a matrix as float arrayepsilon- the maximum difference between each component. 0.0 for true equality- Returns:
trueif the difference of each component ofmatrixanddatais equal or smaller than epsilon.
-
equals
-
add
@Contract("_, _, _ -> param3") @NotNull public static <V extends FloatN> V add(@NotNull V left, @NotNull V right, @UniqueView @NotNull V store) -
subtract
@Contract("_, _, _ -> param3") @NotNull public static <V extends FloatN> V subtract(@NotNull V left, @NotNull V right, @UniqueView @NotNull V store) -
multiply
@Contract("_, _, _ -> param3") @NotNull public static <V extends FloatN> V multiply(@NotNull V left, @NotNull V right, @UniqueView @NotNull V store) -
divide
@Contract("_, _, _ -> param3") @NotNull public static <V extends FloatN> V divide(@NotNull V left, @NotNull V right, @UniqueView @NotNull V store) -
scale
@Contract("_, _, _ -> param3") @NotNull public static <V extends FloatN> V scale(@NotNull V toScale, float factor, @UniqueView @NotNull V store) -
dot
-
length
-
cross
-
normalize
@Contract("_, _ -> param2") @NotNull public static <V extends FloatN> V normalize(@NotNull V toNormalize, @UniqueView @NotNull V store) -
scale
@Contract("_, _, _ -> param3") @NotNull public static <M extends FloatMxN> M scale(@NotNull M toScale, float factor, @UniqueView @NotNull M store) -
determinant
-
adjugate
-
inverse
-
multiply
-
multiply
-
uniqueViewVector
protected static boolean uniqueViewVector(@NotNull @NotNull Vector unique, @NotNull @NotNull Vector @NotNull ... vectors)
-