diff --git a/src/constants.h b/src/constants.h index ccb3271..9d90ca3 100644 --- a/src/constants.h +++ b/src/constants.h @@ -24,4 +24,4 @@ */ const double PI = acos( -1.0 ); -const double SPEED_OF_LIGHT = 2.99792458e+8; \ No newline at end of file +const double SPEED_OF_LIGHT = 299792458.0; \ No newline at end of file diff --git a/src/graphicsellipseitem.cpp b/src/graphicsellipseitem.cpp index 7972223..e58e738 100644 --- a/src/graphicsellipseitem.cpp +++ b/src/graphicsellipseitem.cpp @@ -148,6 +148,7 @@ void GraphicsEllipseItem::calculateProbePath(QPointF startPoint) { double GraphicsEllipseItem::getMasse(double speed) { if(speed < SPEED_OF_LIGHT/10.0) return masse; + if(speed >= SPEED_OF_LIGHT) speed = SPEED_OF_LIGHT - 1e-8; //fuer v>=c nehme v (etwas)