Fixed some isNaNs.
This commit is contained in:
@@ -189,7 +189,7 @@ public class Plane implements IPlane, Serializable
|
|||||||
@Override // from IPlane
|
@Override // from IPlane
|
||||||
public boolean intersection (IRay3 ray, Vector3 result) {
|
public boolean intersection (IRay3 ray, Vector3 result) {
|
||||||
double distance = distance(ray);
|
double distance = distance(ray);
|
||||||
if (Float.isNaN(distance) || distance < 0f) {
|
if (Double.isNaN(distance) || distance < 0f) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
ray.origin().addScaled(ray.direction(), distance, result);
|
ray.origin().addScaled(ray.direction(), distance, result);
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ public class Quaternion implements IQuaternion, Serializable
|
|||||||
|
|
||||||
@Override // from IQuaternion
|
@Override // from IQuaternion
|
||||||
public boolean hasNaN () {
|
public boolean hasNaN () {
|
||||||
return Float.isNaN(x) || Float.isNaN(y) || Float.isNaN(z) || Float.isNaN(w);
|
return Double.isNaN(x) || Double.isNaN(y) || Double.isNaN(z) || Double.isNaN(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override // from IQuaternion
|
@Override // from IQuaternion
|
||||||
|
|||||||
Reference in New Issue
Block a user