Go to the source code of this file.
|
static bool | nearly_equal (double x, double y) |
|
static bool | close_to_a_quadratic (double A, double B) |
|
static bool | approximately_zero (double x) |
|
static int | find_extrema_valid_t (double A, double B, double C, double t[2]) |
|
static double | binary_search (double A, double B, double C, double D, double start, double stop) |
|
|
static constexpr double | PI = 3.141592653589793 |
|
◆ approximately_zero()
static bool approximately_zero |
( |
double |
x | ) |
|
|
static |
Definition at line 153 of file SkCubics.cpp.
153 {
154
155
157}
SIN Vec< N, float > abs(const Vec< N, float > &x)
◆ binary_search()
static double binary_search |
( |
double |
A, |
|
|
double |
B, |
|
|
double |
C, |
|
|
double |
D, |
|
|
double |
start, |
|
|
double |
stop |
|
) |
| |
|
static |
Definition at line 176 of file SkCubics.cpp.
176 {
181 }
184 return -1;
185 }
187 return -1;
188 }
189
190 constexpr int maxIterations = 1000;
191 for (
int i = 0;
i < maxIterations;
i++) {
196 }
197 if ((curr < 0 &&
left < 0) || (curr > 0 &&
left > 0)) {
198
200 } else {
201
203 }
204 }
205 return -1;
206}
static int step(int x, SkScalar min, SkScalar max)
static bool approximately_zero(double x)
static bool SkIsFinite(T x, Pack... values)
static bool left(const SkPoint &p0, const SkPoint &p1)
static bool right(const SkPoint &p0, const SkPoint &p1)
static double EvalAt(double A, double B, double C, double D, double t)
◆ close_to_a_quadratic()
static bool close_to_a_quadratic |
( |
double |
A, |
|
|
double |
B |
|
) |
| |
|
static |
Definition at line 31 of file SkCubics.cpp.
31 {
34 }
36}
bool sk_double_nearly_zero(double a)
◆ find_extrema_valid_t()
static int find_extrema_valid_t |
( |
double |
A, |
|
|
double |
B, |
|
|
double |
C, |
|
|
double |
t[2] |
|
) |
| |
|
static |
Definition at line 159 of file SkCubics.cpp.
160 {
161
162
163
164 double roots[2] = {0, 0};
166 int validRoots = 0;
167 for (
int i = 0;
i < numRoots;
i++) {
169 if (tValue >= 0 && tValue <= 1.0) {
170 t[validRoots++] = tValue;
171 }
172 }
173 return validRoots;
174}
static int RootsReal(double A, double B, double C, double solution[2])
◆ nearly_equal()
static bool nearly_equal |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
static |
Definition at line 20 of file SkCubics.cpp.
20 {
23 }
25}
bool sk_doubles_nearly_equal_ulps(double a, double b, uint8_t maxUlpsDiff=16)
◆ PI
constexpr double PI = 3.141592653589793 |
|
staticconstexpr |