setP method

void setP(
  1. String p,
  2. double v
)

Implementation

void setP(String p, double v) {
  if (p == "x") {
    x = v;
  } else if (p == "y") {
    y = v;
  } else if (p == "z") {
    z = v;
  } else {
    throw (" Vector3.setP $p is not support ");
  }
}