43 float* orig_length =
nullptr) {
44 SkASSERT(!use_rsqrt || (orig_length ==
nullptr));
51 double dmag =
sqrt(xx * xx + yy * yy);
73 if (set_point_length<false>(pt, pt->
fX, pt->
fY, 1.0f, &mag)) {
80 float mag2 =
dx *
dx + dy * dy;
91 return set_point_length<false>(
this,
x,
y,
length);
95 return set_point_length<true>(pt, pt->
fX, pt->
fY,
length);
109 float det = u.
cross(v);
154 }
else if (uDotV > uLengthSqd) {
158 float det = u.
cross(v);
static constexpr float sk_double_to_float(double x)
static bool SkIsFinite(T x, Pack... values)
static constexpr int sk_float_sgn(float x)
static constexpr double sk_ieee_double_divide(double numer, double denom)
static constexpr float sk_ieee_float_divide(float numer, float denom)
static int side(double x)
bool set_point_length(SkPoint *pt, float x, float y, float length, float *orig_length=nullptr)
static bool SetLengthFast(SkPoint *pt, float length)
static SkScalar LengthSqd(const SkPoint &pt)
static SkScalar DistanceToLineSegmentBetweenSqd(const SkPoint &pt, const SkPoint &a, const SkPoint &b)
static SkScalar DistanceToLineBetweenSqd(const SkPoint &pt, const SkPoint &a, const SkPoint &b, Side *side=nullptr)
static SkScalar DistanceToSqd(const SkPoint &pt, const SkPoint &a)
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
SIN Vec< N, float > sqrt(const Vec< N, float > &x)
bool setLength(float length)
static float Normalize(SkVector *vec)
bool setNormalize(float x, float y)
static float DotProduct(const SkVector &a, const SkVector &b)
void set(float x, float y)
static float Length(float x, float y)
float cross(const SkVector &vec) const
void scale(float scale, SkPoint *dst) const
constexpr float y() const
constexpr float x() const