Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
SkPoint3.cpp File Reference
#include "include/core/SkPoint3.h"
#include "include/private/base/SkFloatingPoint.h"
#include <cmath>

Go to the source code of this file.

Functions

static float get_length_squared (float x, float y, float z)
 
static bool is_length_nearly_zero (float x, float y, float z, float *lengthSquared)
 

Function Documentation

◆ get_length_squared()

static float get_length_squared ( float  x,
float  y,
float  z 
)
inlinestatic

Definition at line 14 of file SkPoint3.cpp.

14 {
15 return x * x + y * y + z * z;
16}
double y
double x

◆ is_length_nearly_zero()

static bool is_length_nearly_zero ( float  x,
float  y,
float  z,
float *  lengthSquared 
)
inlinestatic

Definition at line 24 of file SkPoint3.cpp.

24 {
25 *lengthSquared = get_length_squared(x, y, z);
26 return *lengthSquared <= (SK_ScalarNearlyZero * SK_ScalarNearlyZero);
27}
static float get_length_squared(float x, float y, float z)
Definition SkPoint3.cpp:14
#define SK_ScalarNearlyZero
Definition SkScalar.h:99