X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=blobdiff_plain;f=src%2Fmathw.h;h=26a92d867eb322d483f094d639910ef8db0d3cb3;hb=81fc4f043502a5389761d500e95575f1d074daf4;hp=d752838f343571376f1e6586740ce539310af044;hpb=379cc454ab369431b3bdd2fe97cb2e6a1d68c26d;p=physics.git diff --git a/src/mathw.h b/src/mathw.h index d752838..26a92d8 100644 --- a/src/mathw.h +++ b/src/mathw.h @@ -1,3 +1,20 @@ +/* + * Copyright (C) 2008 Patrik Gornicz, Gornicz_P (at) hotmail (dot) com. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef MATHW_H #define MATHW_H @@ -5,13 +22,25 @@ #include "Vector2.h" +/// ***** Public Variables ***** + +static const float PI = 3.1415926535897; + /// ***** Header Methods ***** -int mod(int,int); +int mod(int, int); /// Vector2 Math -//Vector2 vectorToLine(float, float, float, float) const; +Vector2 vectorToLine +( + const Vector2& vec, + float x1, + float y1, + float x2, + float y2 +); + //Vector2 lineIntersection(Vector2&, Vector2&, Vector2&, Vector2&) const; //void Rotate(float rads);