3_PowerRadiated/measuredPowerLienardWiechert/measuredPowerLienardWiechert.c
//calculate distance between field point and the moving electron position:
calculate distance between field point and the moving electron position.
calculate distance between field point and the moving electron position .
double calculateR(double *fieldPoint, double *electronPos) {
  double distance = sqrt(pow((fieldPoint[0] - electronPos[0]),2.0) + 
		                     pow((fieldPoint[1] - electronPos[1]),2.0) + 
		        	           pow((fieldPoint[2] - electronPos[2]),2.0));
  return distance;
}
double calculateR ( double * fieldPoint , double * electronPos ) { double distance = sqrt ( pow ( ( fieldPoint [ 0 ] - electronPos [ 0 ] ) , 2.0 ) + pow ( ( fieldPoint [ 1 ] - electronPos [ 1 ] ) , 2.0 ) + pow ( ( fieldPoint [ 2 ] - electronPos [ 2 ] ) , 2.0 ) ) ; return distance ; }
calculate distance between field point and the moving electron position:
calculate distance between field point and the moving electron position :