public final class VectorUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static double |
magnitude(double[] vector)
Calculates the magnitude of the vector.
|
static float |
magnitude(float[] vector)
Calculates the magnitude of the vector.
|
static double[] |
normalize(double[] vector)
Turns vector to unit vector.
|
static float[] |
normalize(float[] vector)
Turns vector to unit vector.
|
public static double magnitude(double[] vector)
vector - The vector to calculate magnitude for.public static double[] normalize(double[] vector)
vector - The vector to normalize.public static float magnitude(float[] vector)
vector - The vector to calculate magnitude for.public static float[] normalize(float[] vector)
vector - The vector to normalize.Copyright © 2022. All rights reserved.