51 const SkPoint pts[] = { { 0, v }, { v, 0 }, { 1, v }, { v, 1 }, { v, v } };
55 bool nor = p.normalize();
98 memcpy(&storage, &
value, 4);
105 memcpy(&
value, &storage, 4);
113 SkPoint pt = { bigFloat, bigFloat };
135 static const struct {
144 for (
size_t i = 0; i < std::size(
gRec); ++i) {
155 const float tests[] = { 1.0f, 0.0f, 1.0e-37f, 3.4e38f, 42.0f, 0.00012f };
158 for (
unsigned i = 0; i < std::size(
tests); i++) {
164 if (slow.
length() < FLT_MIN && fast.length() < FLT_MIN)
continue;
static const struct @223 gRec[]
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static bool SkIsFinite(T x, Pack... values)
#define SkScalarInvert(x)
static bool SkScalarNearlyEqual(SkScalar x, SkScalar y, SkScalar tolerance=SK_ScalarNearlyZero)
#define SK_ScalarInfinity
#define DEF_TEST(name, reporter)
#define REPORTER_ASSERT(r, cond,...)
static const SkScalar * AsScalars(const SkPoint &pt)
static bool SetLengthFast(SkPoint *pt, float length)
static bool CanNormalize(SkScalar dx, SkScalar dy)
bool setLength(float length)
static float Normalize(SkVector *vec)
void set(float x, float y)
static float Length(float x, float y)
const float * asScalars() const
static void test_overflow(skiatest::Reporter *reporter)
static void test_normalize_cannormalize_consistent(skiatest::Reporter *reporter)
static void test_length(skiatest::Reporter *reporter, SkScalar x, SkScalar y, SkScalar expectedLength)
T get_value(skiatest::Reporter *reporter, T value)
static float force_as_float(skiatest::Reporter *reporter, float value)
static void test_casts(skiatest::Reporter *reporter)
static void test_Normalize(skiatest::Reporter *reporter, SkScalar x, SkScalar y)