From e1c759e42996228e8a04aa7dcefeaed418522209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Oudin?= Date: Mon, 12 Feb 2018 01:26:51 +0100 Subject: [PATCH] Operator should be const --- spheroid.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spheroid.hpp b/spheroid.hpp index 18a782a..407e445 100644 --- a/spheroid.hpp +++ b/spheroid.hpp @@ -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);