div3 static method

PVector? div3(
  1. PVector v,
  2. double n,
  3. PVector? target
)

Divide a vector by a scalar and store the result in another vector. @param target PVector in which to store the result

Implementation

static PVector? div3(PVector v, double n, PVector? target) {
  if (target == null) {
    target = new PVector(v.x / n, v.y / n, v.z / n);
  } else {
    target.set(v.x / n, v.y / n, v.z / n);
  }
  return target;
}