/** * Performs linear interpolation between two vectors. * * If percent is between 0.0 and 1.0, the result is: percent (y - x) + x. * If percent is less than 0.0, the result is x. If percent is * greater than 1.0, the result is y. * * @param first * The first vector. Sometimes this is referred to as x. * @param second * The second vector. Sometimes this is referred to as y. * @param percent * A value between 0.0 and 1.0 to interpolate between the two vectors. * Sometimes this is also referred to as alpha. * @return * A new vector that is linearly interpolated between the two vectors * vectors. */ public static Vector interpolateLinear( final Vectorizable first, final Vectorizable second, final double percent) { return interpolateLinear( first.convertToVector(), second.convertToVector(), percent); }
/** * Performs linear interpolation between two vectors. * * If percent is between 0.0 and 1.0, the result is: percent (y - x) + x. * If percent is less than 0.0, the result is x. If percent is * greater than 1.0, the result is y. * * @param first * The first vector. Sometimes this is referred to as x. * @param second * The second vector. Sometimes this is referred to as y. * @param percent * A value between 0.0 and 1.0 to interpolate between the two vectors. * Sometimes this is also referred to as alpha. * @return * A new vector that is linearly interpolated between the two vectors * vectors. */ public static Vector interpolateLinear( final Vectorizable first, final Vectorizable second, final double percent) { return interpolateLinear( first.convertToVector(), second.convertToVector(), percent); }
/** * Performs linear interpolation between two vectors. * * If percent is between 0.0 and 1.0, the result is: percent (y - x) + x. * If percent is less than 0.0, the result is x. If percent is * greater than 1.0, the result is y. * * @param first * The first vector. Sometimes this is referred to as x. * @param second * The second vector. Sometimes this is referred to as y. * @param percent * A value between 0.0 and 1.0 to interpolate between the two vectors. * Sometimes this is also referred to as alpha. * @return * A new vector that is linearly interpolated between the two vectors * vectors. */ public static Vector interpolateLinear( final Vectorizable first, final Vectorizable second, final double percent) { return interpolateLinear( first.convertToVector(), second.convertToVector(), percent); }