示例#1
0
  public static Vector3d linearCombination(
      double a1, Vector3d v1, double a2, Vector3d v2, double a3, Vector3d v3) {
    Vector3d v =
        new Vector3d(
            (a1 * v1.getX()) + (a2 * v2.getX()) + (a3 * v3.getX()),
            (a1 * v1.getY()) + (a2 * v2.getY()) + (a3 * v3.getY()),
            (a1 * v1.getZ()) + (a2 * v2.getZ()) + (a3 * v3.getZ()));

    return v;
  }
示例#2
0
 public static Vector3d linearCombination(double a1, Vector3d v1, double a2, Vector3d v2) {
   return new Vector3d(
       (a1 * v1.getX()) + (a2 * v2.getX()),
       (a1 * v1.getY()) + (a2 * v2.getY()),
       (a1 * v1.getZ()) + (a2 * v2.getZ()));
 }