/** * Gets the direction vector of a certain angle in radians. * * @param angle in radians * @return the direction vector */ public static Vector2f createDirectionRad(double angle) { return createDirectionRad((float) angle); }
/** * Gets the direction vector of a certain angle in radians. * * @param angle in radians * @return the direction vector */ public static Vector2f createDirectionRad(double angle) { return createDirectionRad((float) angle); }
/** * Gets the direction vector of a random angle using the random specified. * * @param random to use * @return the random direction vector */ public static Vector2f createRandomDirection(Random random) { return createDirectionRad(random.nextFloat() * (float) TrigMath.TWO_PI); }
/** * Gets the direction vector of a certain angle in degrees. * * @param angle in degrees * @return the direction vector */ public static Vector2f createDirectionDeg(float angle) { return createDirectionRad((float) Math.toRadians(angle)); }
/** * Gets the direction vector of a random angle using the random specified. * * @param random to use * @return the random direction vector */ public static Vector2f createRandomDirection(Random random) { return createDirectionRad(random.nextFloat() * (float) TrigMath.TWO_PI); }
/** * Gets the direction vector of a certain angle in degrees. * * @param angle in degrees * @return the direction vector */ public static Vector2f createDirectionDeg(float angle) { return createDirectionRad((float) Math.toRadians(angle)); }