/** * Creates a new complex from the double angle in radians. * * @param angle The angle in radians * @return The complex defined by the angle */ public static Complexf fromAngleRad(double angle) { return fromAngleRad((float) angle); }
/** * Creates a new complex from the double angle in radians. * * @param angle The angle in radians * @return The complex defined by the angle */ public static Complexf fromAngleRad(double angle) { return fromAngleRad((float) angle); }
/** * Creates a new complex from the double angle in degrees. * * @param angle The angle in degrees * @return The complex defined by the angle */ public static Complexf fromAngleDeg(double angle) { return fromAngleRad(Math.toRadians(angle)); }
/** * Creates a new complex from the float angle in radians. * * @param angle The angle in radians * @return The complex defined by the angle */ public static Complexf fromAngleDeg(float angle) { return fromAngleRad((float) Math.toRadians(angle)); }
/** * Creates a new complex from the double angle in degrees. * * @param angle The angle in degrees * @return The complex defined by the angle */ public static Complexf fromAngleDeg(double angle) { return fromAngleRad(Math.toRadians(angle)); }
/** * Creates a new complex from the float angle in radians. * * @param angle The angle in radians * @return The complex defined by the angle */ public static Complexf fromAngleDeg(float angle) { return fromAngleRad((float) Math.toRadians(angle)); }
/** * Creates a new complex from the angle defined from the first to the second vector. * * @param from The first vector * @param to The second vector * @return The complex defined by the angle between the vectors */ public static Complexf fromRotationTo(Vector2f from, Vector2f to) { return fromAngleRad(TrigMath.acos(from.dot(to) / (from.length() * to.length()))); }
/** * Creates a new complex from the angle defined from the first to the second vector. * * @param from The first vector * @param to The second vector * @return The complex defined by the angle between the vectors */ public static Complexf fromRotationTo(Vector3f from, Vector3f to) { return fromAngleRad(TrigMath.acos(from.dot(to) / (from.length() * to.length()))); }
/** * Creates a new complex from the angle defined from the first to the second vector. * * @param from The first vector * @param to The second vector * @return The complex defined by the angle between the vectors */ public static Complexf fromRotationTo(Vector2f from, Vector2f to) { return fromAngleRad(TrigMath.acos(from.dot(to) / (from.length() * to.length()))); }
/** * Creates a new complex from the angle defined from the first to the second vector. * * @param from The first vector * @param to The second vector * @return The complex defined by the angle between the vectors */ public static Complexf fromRotationTo(Vector3f from, Vector3f to) { return fromAngleRad(TrigMath.acos(from.dot(to) / (from.length() * to.length()))); }