]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Quaternions.h
beautified code
[lugaru.git] / Source / Quaternions.h
index 6104044aada9b8a6e412fe10b68913f274b14f8b..417c299ef27b091ba3876e7045ca5c25f7b35a25 100644 (file)
@@ -105,9 +105,9 @@ inline XYZ DoRotationRadian(XYZ thePoint, float xang, float yang, float zang);
 inline float findDistance(XYZ *point1, XYZ *point2);
 inline float findLength(XYZ *point1);
 inline float findLengthfast(XYZ *point1);
-inline float findDistancefast(XYZ *point1, XYZ *point2);
-inline float findDistancefast(XYZ point1, XYZ point2);
-inline float findDistancefastflat(XYZ *point1, XYZ *point2);
+inline float distsq(XYZ *point1, XYZ *point2);
+inline float distsq(XYZ point1, XYZ point2);
+inline float distsqflat(XYZ *point1, XYZ *point2);
 inline float dotproduct(const XYZ *point1, const XYZ *point2);
 bool sphere_line_intersection (
                                                           float x1, float y1 , float z1,
@@ -302,15 +302,15 @@ inline float findLengthfast(XYZ *point1){
        return((point1->x)*(point1->x)+(point1->y)*(point1->y)+(point1->z)*(point1->z));
 }
 
-inline float findDistancefast(XYZ *point1, XYZ *point2){
+inline float distsq(XYZ *point1, XYZ *point2){
        return((point1->x-point2->x)*(point1->x-point2->x)+(point1->y-point2->y)*(point1->y-point2->y)+(point1->z-point2->z)*(point1->z-point2->z));
 }
 
-inline float findDistancefast(XYZ point1, XYZ point2){
+inline float distsq(XYZ point1, XYZ point2){
        return((point1.x-point2.x)*(point1.x-point2.x)+(point1.y-point2.y)*(point1.y-point2.y)+(point1.z-point2.z)*(point1.z-point2.z));
 }
 
-inline float findDistancefastflat(XYZ *point1, XYZ *point2){
+inline float distsqflat(XYZ *point1, XYZ *point2){
        return((point1->x-point2->x)*(point1->x-point2->x)+(point1->z-point2->z)*(point1->z-point2->z));
 }
 
@@ -370,8 +370,8 @@ inline bool sphere_line_intersection (
        // This function returns a pointer array which first index indicates
        // the number of intersection point, followed by coordinate pairs.
 
-       static float x , y , z;
-       static float a, b, c, mu, i ;
+       //~ static float x , y , z;
+       static float a, b, c, /*mu,*/ i ;
 
        if(x1>x3+r&&x2>x3+r)return(0);
        if(x1<x3-r&&x2<x3-r)return(0);
@@ -409,8 +409,8 @@ inline bool sphere_line_intersection (
        // This function returns a pointer array which first index indicates
        // the number of intersection point, followed by coordinate pairs.
 
-       static float x , y , z;
-       static float a, b, c, mu, i ;
+       //~ static float x , y , z;
+       static float a, b, c, /*mu,*/ i ;
 
        if(p1->x>p3->x+*r&&p2->x>p3->x+*r)return(0);
        if(p1->x<p3->x-*r&&p2->x<p3->x-*r)return(0);