(vector: number[], precission = 1000)
| 4 | } |
| 5 | |
| 6 | static round(vector: number[], precission = 1000) { |
| 7 | return [ |
| 8 | Math.round(vector[0] * precission) / precission, |
| 9 | Math.round(vector[1] * precission) / precission, |
| 10 | Math.round(vector[2] * precission) / precission, |
| 11 | ]; |
| 12 | } |
| 13 | |
| 14 | static getNormal(points: number[][]) { |
| 15 | const a = Vector.subtract(points[0], points[1]); |