* 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)
| 181 | * @returns Reference to this object for method chaining |
| 182 | */ |
| 183 | maxV(v: Vector2d | Vector3d) { |
| 184 | const _vz = "z" in v ? v.z : 0; |
| 185 | return this.set( |
| 186 | this.x > v.x ? this.x : v.x, |
| 187 | this.y > v.y ? this.y : v.y, |
| 188 | this.z > _vz ? this.z : _vz, |
| 189 | ); |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * Floor the vector values |
no test coverage detected