From 97cb291cc348acb925e99144c725869e05ff4f46 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 8 Jan 2015 16:45:51 +0100 Subject: Indentation fixes --- geom.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/geom.hpp b/geom.hpp index 603abf9..0c0a054 100644 --- a/geom.hpp +++ b/geom.hpp @@ -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; } -- cgit v1.2.3