diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-01-08 16:45:51 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-01-08 16:45:51 +0100 |
commit | 97cb291cc348acb925e99144c725869e05ff4f46 (patch) | |
tree | c093a63e113877444c8165ae89b10deebd36c1ef | |
parent | 803d245cc906b6397ef1952df1f858cc46d0c444 (diff) | |
download | Robotique-Projet-97cb291cc348acb925e99144c725869e05ff4f46.tar.gz Robotique-Projet-97cb291cc348acb925e99144c725869e05ff4f46.zip |
Indentation fixes
-rw-r--r-- | geom.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -39,10 +39,10 @@ struct vec { static double dot(vec a, vec b) { // dot product (produit scalaire) return a.x * b.x + a.y * b.y; } - static double cross(vec a, vec b) { // cross product (déterminant 2x2) + static double cross(vec a, vec b) { // cross product (déterminant 2x2) return a.x * b.y - a.y * b.x; } - static double angle(vec a, vec b) { // oriented angle between two vectors + static double angle(vec a, vec b) { // oriented angle between two vectors if (a.is_nil() || b.is_nil()) return 0; float cos = dot(a.normalize(), b.normalize()); if (cos <= -1) return M_PI; @@ -82,8 +82,8 @@ struct line { return abs(a*p.x + b*p.y + c) / sqrt(a*a + b*b); } vec dir() const { - // calculate a directional vector oh the line - return vec(-b,a); + // calculate a directional vector oh the line + return vec(-b,a); } vec proj(vec p) const { @@ -104,7 +104,7 @@ struct segment { bool on_segment(vec p) const { // TODO - + // does point intersect segment? return false; } @@ -131,7 +131,7 @@ struct circle { double dist(vec p) const { // distance à un cercle - double d = (c-p).norm() ; + double d = (c-p).norm() ; if (d > r) return (d - r); return 0; } |