2_Trajectories/motionWLorentzForce/motionWLorentzForce.c
//Function to calculate beta. The speed is then v=beta*c
Function to calculate beta. The speed is then v=beta*c
Function to calculate beta . The speed is then v = beta * c
double calculateBeta(double T) {
  double eMass = 9.10938356e-31;
  double c = 299792458.0;
  double factor = pow(T,2.0)/(pow(eMass,2.0)*pow(c,4.0)) + (2.0*T)/(eMass*pow(c,2.0)) + 1;
  double beta = sqrt(1.0 - 1.0/factor);
  return beta;
}
double calculateBeta ( double T ) { double eMass = 9.10938356e-31 ; double c = 299792458.0 ; double factor = pow ( T , 2.0 ) / ( pow ( eMass , 2.0 ) * pow ( c , 4.0 ) ) + ( 2.0 * T ) / ( eMass * pow ( c , 2.0 ) ) + 1 ; double beta = sqrt ( 1.0 - 1.0 / factor ) ; return beta ; }
Function to calculate beta.
Function to calculate beta .