src/Math/Point.php
protected function transByPoint(Point $shift, $distance = null)
  {
    if(isset($distance))
    {
      if($distance == 0)
        return clone $this;

      return $this->transByPoint(static::fromPolar($distance, $shift->ap, $shift->av));
    }

    return static::fromCartesian(
      $this->x + $shift->x,
      $this->y + $shift->y,
      $this->z + $shift->z
    );
  }
protected function transByPoint(Point $shift, $distance = null)
  {
    if(isset($distance))
    {
      if($distance == 0)
        return clone $this;

      return $this->transByPoint(static::fromPolar($distance, $shift->ap, $shift->av));
    }

    return static::fromCartesian(
      $this->x + $shift->x,
      $this->y + $shift->y,
      $this->z + $shift->z
    );
  }
protected function transByPoint ( Point $ shift , $ distance = null ) { if ( isset ( $ distance ) ) { if ( $ distance == 0 ) return clone $ this ; return $ this -> transByPoint ( static :: fromPolar ( $ distance , $ shift -> ap , $ shift -> av ) ) ; } return static :: fromCartesian ( $ this -> x + $ shift -> x , $ this -> y + $ shift -> y , $ this -> z + $ shift -> z ) ; }
Translate coordinates in space (Point/Vector+distance)

[1] ->translate(static $shift)
- $shift is treated as a set of offsets to shift the origin by.
[2] ->translate(static $shift, $distance)
- $shift is treated as a direction (vector) to move the the point a $distance into.

@param self $shift the deltas or direction of translation.
@param ?numeric $distance the distance of translation.
@return self the translated coordinate
Translate coordinates in space ( Point / Vector + distance )