46 float t_plus_a_sq = t + a_sq;
47 float t_plus_b_sq = t + b_sq;
48 float gt =
Square(mA * inPoint.
x / t_plus_a_sq) +
Square(mB * inPoint.
y / t_plus_b_sq) - 1.0f;
51 if (abs(gt) < 1.0e-6f)
52 return Float2(a_sq * inPoint.
x / t_plus_a_sq, b_sq * inPoint.
y / t_plus_b_sq);
55 float gt_accent = -2.0f *
60 float tn = t - gt / gt_accent;
#define JPH_NAMESPACE_END
Definition: Core.h:367
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:361
#define JPH_ASSERT(...)
Definition: IssueReporting.h:33
constexpr T Cubed(T inV)
Returns .
Definition: Math.h:59
constexpr T Square(T inV)
Square a value.
Definition: Math.h:52
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition: Memory.h:29
Float2 GetClosestPoint(const Float2 &inPoint) const
Definition: Ellipse.h:30
JPH_OVERRIDE_NEW_DELETE Ellipse(float inA, float inB)
Construct ellipse with radius A along the X-axis and B along the Y-axis.
Definition: Ellipse.h:19
bool IsInside(const Float2 &inPoint) const
Check if inPoint is inside the ellipse.
Definition: Ellipse.h:22
Float2 GetNormal(const Float2 &inPoint) const
Get normal at point inPoint (non-normalized vector)
Definition: Ellipse.h:66
Class that holds 2 floats, used as a storage class mainly.
Definition: Float2.h:11
float y
Definition: Float2.h:31
float x
Definition: Float2.h:30