[Scummvm-cvs-logs] SF.net SVN: scummvm:[44306] scummvm/trunk/engines/sci/engine/kmath.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Thu Sep 24 16:07:03 CEST 2009
Revision: 44306
http://scummvm.svn.sourceforge.net/scummvm/?rev=44306&view=rev
Author: lordhoto
Date: 2009-09-24 14:07:02 +0000 (Thu, 24 Sep 2009)
Log Message:
-----------
Fix what looks like a typo in the condition, which checks for a divide by zero.
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kmath.cpp
Modified: scummvm/trunk/engines/sci/engine/kmath.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmath.cpp 2009-09-24 14:02:05 UTC (rev 44305)
+++ scummvm/trunk/engines/sci/engine/kmath.cpp 2009-09-24 14:07:02 UTC (rev 44306)
@@ -128,7 +128,7 @@
int value = argv[1].toSint16();
double cosval = cos(angle * PI / 180.0);
- if ((cosval < 0.0001) && (cosval > 0.0001)) {
+ if ((cosval < 0.0001) && (cosval > -0.0001)) {
warning("Attepted division by zero");
return make_reg(0, 0);
} else
@@ -140,7 +140,7 @@
int value = argv[1].toSint16();
double sinval = sin(angle * PI / 180.0);
- if ((sinval < 0.0001) && (sinval > 0.0001)) {
+ if ((sinval < 0.0001) && (sinval > -0.0001)) {
warning("Attepted division by zero");
return make_reg(0, 0);
} else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list