[xiph-cvs] cvs commit: vorbis/lib mapping0.c
Monty
xiphmont at xiph.org
Tue Jul 10 22:23:23 PDT 2001
xiphmont 01/07/10 22:23:22
Modified: lib Tag: branch_monty_20010708 mapping0.c
Log:
Eliminate a divide by zero that you could drive a truck through.
Revision Changes Path
No revision
No revision
1.33.2.2 +7 -7 vorbis/lib/mapping0.c
Index: mapping0.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/mapping0.c,v
retrieving revision 1.33.2.1
retrieving revision 1.33.2.2
diff -u -r1.33.2.1 -r1.33.2.2
--- mapping0.c 2001/07/08 08:48:01 1.33.2.1
+++ mapping0.c 2001/07/11 05:23:22 1.33.2.2
@@ -11,7 +11,7 @@
********************************************************************
function: channel mapping 0 implementation
- last mod: $Id: mapping0.c,v 1.33.2.1 2001/07/08 08:48:01 xiphmont Exp $
+ last mod: $Id: mapping0.c,v 1.33.2.2 2001/07/11 05:23:22 xiphmont Exp $
********************************************************************/
@@ -392,20 +392,20 @@
ang=B-A;
}else{
mag=B;
- if(B>0)
- ang=A-B;
- else
- ang=B-A;
+ if(B>0)
+ ang=A-B;
+ else
+ ang=B-A;
}
if(j>12){
if(j>=n*3/64){
-
+
if(j>=n*3/32){
ang=0;
}else{
- ang=rint(ang/rint(mag))*rint(mag);
+ if(mag!=0.f)ang=rint(ang/mag)*mag;
//if(fabs(mag)<2.5)
//ang=0;
}
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list