* 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 | ObservableVector3d)
| 260 | * @returns Reference to this object for method chaining |
| 261 | */ |
| 262 | minV(v: Vector2d | Vector3d | ObservableVector3d) { |
| 263 | const _vz = "z" in v ? v.z : 0; |
| 264 | return this.set( |
| 265 | this.x < v.x ? this.x : v.x, |
| 266 | this.y < v.y ? this.y : v.y, |
| 267 | this.z < _vz ? this.z : _vz, |
| 268 | ); |
| 269 | } |
| 270 | |
| 271 | /** |
| 272 | * Update this vector with the maximum value between this and the passed vector |