(x: number | undefined, y: number | undefined)
| 27 | } |
| 28 | |
| 29 | addPoint(x: number | undefined, y: number | undefined) { |
| 30 | if (typeof x !== 'undefined') { |
| 31 | if (isNaN(this.x1) || isNaN(this.x2)) { |
| 32 | this.x1 = x |
| 33 | this.x2 = x |
| 34 | } |
| 35 | |
| 36 | if (x < this.x1) { |
| 37 | this.x1 = x |
| 38 | } |
| 39 | |
| 40 | if (x > this.x2) { |
| 41 | this.x2 = x |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | if (typeof y !== 'undefined') { |
| 46 | if (isNaN(this.y1) || isNaN(this.y2)) { |
| 47 | this.y1 = y |
| 48 | this.y2 = y |
| 49 | } |
| 50 | |
| 51 | if (y < this.y1) { |
| 52 | this.y1 = y |
| 53 | } |
| 54 | |
| 55 | if (y > this.y2) { |
| 56 | this.y2 = y |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | addX(x: number) { |
| 62 | this.addPoint(x, 0) |
no outgoing calls
no test coverage detected