* Update this vector with the maximum value between this and the passed vector * @param v other vector * @returns Reference to this object for method chaining
(v: Vector2d | Vector3d | ObservableVector3d)
| 274 | * @returns Reference to this object for method chaining |
| 275 | */ |
| 276 | maxV(v: Vector2d | Vector3d | ObservableVector3d) { |
| 277 | const _vz = "z" in v ? v.z : 0; |
| 278 | return this.set( |
| 279 | this.x > v.x ? this.x : v.x, |
| 280 | this.y > v.y ? this.y : v.y, |
| 281 | this.z > _vz ? this.z : _vz, |
| 282 | ); |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * Floor the vector values |