Revision: 54151
http://brlcad.svn.sourceforge.net/brlcad/?rev=54151&view=rev
Author: carlmoore
Date: 2013-01-09 22:32:52 +0000 (Wed, 09 Jan 2013)
Log Message:
-----------
remove reference to help (would be replaced by a man page), and add an 'if'
construct to avoid division by 0
Modified Paths:
--------------
brlcad/trunk/src/proc-db/brickwall.c
Modified: brlcad/trunk/src/proc-db/brickwall.c
===================================================================
--- brlcad/trunk/src/proc-db/brickwall.c 2013-01-09 05:22:53 UTC (rev
54150)
+++ brlcad/trunk/src/proc-db/brickwall.c 2013-01-09 22:32:52 UTC (rev
54151)
@@ -21,8 +21,6 @@
*
* builds a brick wall.
*
- * Options
- * h help
*/
#include "common.h"
@@ -366,9 +364,13 @@
vert_bricks = (int)(wall_height / (brick_height+(horiz_spacing*0.5)));
+ if (vert_bricks > 1) {
vert_spacing =
(wall_height - vert_bricks * brick_height) /
(vert_bricks - 1);
+ } else {
+ vert_spacing = 0;
+ }
fprintf(stderr, "wall %d bricks wide, %d bricks high\n",
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits