From 806ee13444b4247ebbb2af59b11129bb2d1034ae Mon Sep 17 00:00:00 2001 From: catdog2 Date: Sat, 22 Nov 2008 17:02:01 +0000 Subject: [PATCH] ueberlichtgeschwindigkeitssache git-svn-id: http://svn.lsim.tuxzone.org/trunk@22 4bec179b-ab65-46ed-a5f8-55b8b5c735d0 --- src/constants.h | 2 +- src/graphicsellipseitem.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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)