source: trunk/CLHEP/Vector/Sqr.h

Last change on this file was 4, checked in by Pavel Demin, 16 years ago

first commit

File size: 590 bytes
Line 
1// -*- C++ -*-
2// CLASSDOC OFF
3// $Id: Sqr.h,v 1.1 2008-06-04 14:15:01 demin 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 */
Note: See TracBrowser for help on using the repository browser.