Geant4.10
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
UVector2.cc File Reference
#include <cmath>
#include <iostream>
#include "UVector2.hh"

Go to the source code of this file.

Functions

UVector2 operator/ (const UVector2 &p, double a)
 
std::ostream & operator<< (std::ostream &os, const UVector2 &q)
 

Function Documentation

UVector2 operator/ ( const UVector2 p,
double  a 
)

Definition at line 73 of file UVector2.cc.

References UVector2::x, and UVector2::y.

74 {
75  if (a == 0)
76  {
77  // ZMthrowA(ZMxpvInfiniteVector( "Division of UVector2 by zero"));
78  }
79  return UVector2(p.x / a, p.y / a);
80 }
double x
Definition: UVector2.hh:195
double y
Definition: UVector2.hh:196
std::ostream& operator<< ( std::ostream &  os,
const UVector2 q 
)

Definition at line 82 of file UVector2.cc.

References UVector2::x, and UVector2::y.

83 {
84  os << "(" << q.x << ", " << q.y << ")";
85  return os;
86 }
double x
Definition: UVector2.hh:195
double y
Definition: UVector2.hh:196