| 1398 | namespace |
| 1399 | { |
| 1400 | inline float ArcError(const Spline2& s, float* tSplit) |
| 1401 | { |
| 1402 | Vec2f ex = ArcError2(s.xb); |
| 1403 | Vec2f ey = ArcError2(s.yb); |
| 1404 | |
| 1405 | float e0 = ex.x + ey.x; |
| 1406 | float e1 = ex.y + ey.y; |
| 1407 | float es2 = e0 + e1; |
| 1408 | |
| 1409 | float f = (es2 < 1e-6f) ? 0.5f : sqrtf(e0 / es2); |
| 1410 | |
| 1411 | *tSplit = (1.0f / 3.0f) * (1.0f + f); |
| 1412 | |
| 1413 | return sqrtf(es2); |
| 1414 | } |
| 1415 | |
| 1416 | void SubdivideForT(const Spline2& s, vector<Spline2>* splines, float tolerance) |
| 1417 | { |
no test coverage detected