diff --git a/spheroid.cpp b/spheroid.cpp index d55f451..b6cb9f6 100644 --- a/spheroid.cpp +++ b/spheroid.cpp @@ -68,7 +68,7 @@ void Spheroid::check_perlin_collision(PerlinNoise perlin) { double Spheroid::operator() (double _x, double _y, double _z) const { - return (pow(_x - center.x, 2) / pow(q, 2) - + pow(_y - center.y, 2) / pow(q, 2) - + pow(_z - center.z, 2) / pow(p, 2) -1); + return (pow(_x, 2) / pow(q, 2) + + pow(_y, 2) / pow(q, 2) + + pow(_z, 2) / pow(p, 2) -1); }