CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Sqr.h
Go to the documentation of this file.
1// -*- C++ -*-
2// CLASSDOC OFF
3// $Id: Sqr.h,v 1.1 2003/07/22 21:29:12 garren Exp $
4// ---------------------------------------------------------------------------
5// CLASSDOC ON
6//
7// This file is a part of the CLHEP - a Class Library for High Energy Physics.
8//
9// This file contains a template definition of sqr()
10// sqr() is used only by Vector/test/testLorentzVector.cc
11//
12#ifndef HEP_SQR_H
13#define HEP_SQR_H
14
15#ifndef CLHEP_SQR_DEFINED
16#define CLHEP_SQR_DEFINED
17#ifdef sqr
18#undef sqr
19#endif
20template <class T>
21inline T sqr(const T& x) {
22 return x*x;
23}
24#endif
25
26#endif /* HEP_SQR_H */
T sqr(const T &x)
Definition: Sqr.h:21