void CalcHeight(MegaAxis axis, float angle, MegaBox3 bbx) { switch ( axis ) { case MegaAxis.X: height = bbx.max.x - bbx.min.x; break; case MegaAxis.Z: height = bbx.max.y - bbx.min.y; break; case MegaAxis.Y: height = bbx.max.z - bbx.min.z; break; } if ( height == 0.0f ) { theAngle = 0.0f; angleOverHeight = 0.0f; } else { theAngle = angle; angleOverHeight = angle / height; } }
void CalcHeight(MegaAxis axis, float angle, MegaBox3 bbx) { switch (axis) { case MegaAxis.X: height = bbx.max.x - bbx.min.x; break; case MegaAxis.Z: height = bbx.max.y - bbx.min.y; break; case MegaAxis.Y: height = bbx.max.z - bbx.min.z; break; } if (height == 0.0f) { theAngle = 0.0f; angleOverHeight = 0.0f; } else { theAngle = angle; angleOverHeight = angle / height; } }