X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=blobdiff_plain;f=src%2Fmathw.h;h=26a92d867eb322d483f094d639910ef8db0d3cb3;hb=f5380bc68a49710df6c10b089da232afb791344e;hp=0d9e3ab14369df005a8cb87db1d0d283d705539b;hpb=ad9f1fb6bdfc51df61a7fb52d607ca0c0bceca4c;p=physics.git diff --git a/src/mathw.h b/src/mathw.h index 0d9e3ab..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,17 +22,25 @@ #include "Vector2.h" -/// ***** Header Methods ***** +/// ***** Public Variables ***** -int mod(int,int); +static const float PI = 3.1415926535897; -float radsToA(float); -float atanA(float); -float atan2A(float, float); +/// ***** Header Methods ***** + +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);