-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79bd917
commit 628841a
Showing
1 changed file
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,17 +45,18 @@ You can contact Cyan Worlds, Inc. by email [email protected] | |
#include <cmath> | ||
#include "plTriUtils.h" | ||
|
||
static const float kAlmostZero = 1.e-5f; | ||
static const float kPastZero = -kAlmostZero; | ||
static const float kPastOne = 1.f + kAlmostZero; | ||
static const float kAlmostOne = 1.f - kAlmostZero; | ||
static const float kAlmostZeroSquared = kAlmostZero*kAlmostZero; | ||
static constexpr float kAlmostZero = 1.e-5f; | ||
static constexpr float kPastZero = -kAlmostZero; | ||
static constexpr float kPastOne = 1.f + kAlmostZero; | ||
static constexpr float kAlmostOne = 1.f - kAlmostZero; | ||
static constexpr float kAlmostZeroSquared = kAlmostZero*kAlmostZero; | ||
|
||
static inline hsVector3 Cross(const hsScalarTriple& p0, const hsScalarTriple& p1) | ||
{ | ||
return hsVector3(p0.fY * p1.fZ - p0.fZ * p1.fY, | ||
p0.fZ * p1.fX - p0.fX * p1.fZ, | ||
p0.fX * p1.fY - p0.fY * p1.fX); | ||
return {p0.fY * p1.fZ - p0.fZ * p1.fY, | ||
p0.fZ * p1.fX - p0.fX * p1.fZ, | ||
p0.fX * p1.fY - p0.fY * p1.fX | ||
}; | ||
} | ||
|
||
|
||
|