Operator should be const

This commit is contained in:
Rémi Oudin 2018-02-12 01:26:51 +01:00
parent a824763e3b
commit e1c759e429

View file

@ -19,7 +19,7 @@ class Spheroid : public ImplicitSurface {
void set_stiffness(size_t _stiffness);
void check_horizontal_plan_collision(double& height);
void check_vertical_plan_collision(double& abscissa);
double operator() (double _x, double _y, double _z) {
double 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);