Revision: 55194
          http://brlcad.svn.sourceforge.net/brlcad/?rev=55194&view=rev
Author:   carlmoore
Date:     2013-04-19 20:54:34 +0000 (Fri, 19 Apr 2013)
Log Message:
-----------
shorten the logic in the setting of 'scale', and rearrange an if-else thru 
removal of '!'

Modified Paths:
--------------
    brlcad/trunk/src/sig/d-f.c

Modified: brlcad/trunk/src/sig/d-f.c
===================================================================
--- brlcad/trunk/src/sig/d-f.c  2013-04-19 20:52:46 UTC (rev 55193)
+++ brlcad/trunk/src/sig/d-f.c  2013-04-19 20:54:34 UTC (rev 55194)
@@ -52,9 +52,7 @@
     scale = 1.0;
 
     if ( argc > 1 ) {
-       if ( BU_STR_EQUAL( argv[1], "-n" ) )
-           scale = 1.0;
-       else
+       if ( ! BU_STR_EQUAL( argv[1], "-n" ) )
            scale = atof( argv[1] );
        argc--;
     }
@@ -64,12 +62,12 @@
     }
 
     while ( (num = fread( &ibuf[0], sizeof( ibuf[0] ), 512, stdin)) > 0 ) {
-       if ( !EQUAL(scale, 1.0) ) {
+       if ( EQUAL(scale, 1.0) ) {
            for ( i = 0; i < num; i++ )
-               obuf[i] = ibuf[i] * scale;
+               obuf[i] = ibuf[i];
        } else {
            for ( i = 0; i < num; i++ )
-               obuf[i] = ibuf[i];
+               obuf[i] = ibuf[i] * scale;
        }
 
        ret = fwrite( &obuf[0], sizeof( obuf[0] ), num, stdout );

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to