All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces
MathUtil.h File Reference
#include <cmath>
#include <vector>

Go to the source code of this file.

Namespaces

 util
 Namespace for general, non-LArSoft-specific utilities.
 

Functions

Simple mathematical functions
template<class T >
util::sqr (T x)
 More efficient square function than pow(x,2) More...
 
template<class T >
util::cube (T x)
 More efficient cube function than pow(x,3) More...
 
template<class T >
util::ipow (T x, unsigned int n)
 More efficient exponentiation function than pow(x,n) for small n. More...
 
double util::pythag (double x, double y)
 2D Euclidean distance More...
 
double util::pythag (double x, double y, double z)
 3D Euclidean distance More...