* Update this vector with the minimum value between this and the passed vector * @param v other vector * @returns Reference to this object for method chaining
(v: Vector2d | Vector3d)
| 167 | * @returns Reference to this object for method chaining |
| 168 | */ |
| 169 | minV(v: Vector2d | Vector3d) { |
| 170 | const _vz = "z" in v ? v.z : 0; |
| 171 | return this.set( |
| 172 | this.x < v.x ? this.x : v.x, |
| 173 | this.y < v.y ? this.y : v.y, |
| 174 | this.z < _vz ? this.z : _vz, |
| 175 | ); |
| 176 | } |
| 177 | |
| 178 | /** |
| 179 | * Update this vector with the maximum value between this and the passed vector |
no test coverage detected