Skip to content
Snippets Groups Projects
Commit 37678373 authored by Saad Jbabdi's avatar Saad Jbabdi
Browse files

added a plane geometry function

parent b6170b09
No related branches found
No related tags found
No related merge requests found
......@@ -167,6 +167,11 @@ namespace MISCMATHS {
void cart2sph(const Matrix& dir,ColumnVector& th,ColumnVector& ph);//ditto
void cart2sph(const vector<ColumnVector>& dir,ColumnVector& th,ColumnVector& ph);// same but in a vector
// geometry function
inline float point_plane_distance(const ColumnVector& X,const ColumnVector& P){//plane defined by a,b,c,d with a^2+b^2+c^2=1
return( dot(X,P.SubMatrix(1,3,1,1))+P(4) );
}
// returns the first P such that 2^P >= abs(N).
int nextpow2(int n);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment