Revision: 76909
http://sourceforge.net/p/brlcad/code/76909
Author: brlcad
Date: 2020-08-24 03:42:52 +0000 (Mon, 24 Aug 2020)
Log Message:
-----------
explain what set_factor was doing, had wrong comment, and renamed for future
clarity.
Modified Paths:
--------------
brlcad/trunk/src/rt/viewarea.c
Modified: brlcad/trunk/src/rt/viewarea.c
===================================================================
--- brlcad/trunk/src/rt/viewarea.c 2020-08-23 17:48:46 UTC (rev 76908)
+++ brlcad/trunk/src/rt/viewarea.c 2020-08-24 03:42:52 UTC (rev 76909)
@@ -607,13 +607,11 @@
/*
- * Prints a list of region areas sorted alphabetically reporting
- * either the presented or exposed area 'type' and keeping track of
- * the 'count' of regions printed. this routine returns the number of
- * ray hits across all regions.
+ * for the current units, determine a larger alternative unit. this
+ * is so we can display the larger unit consistently in parenthesis.
*/
static double
-set_factor() {
+alternative_display_factor() {
if (ZERO(units - 1.0))
return bu_units_conversion("m");
else if (ZERO(units - 10.0))
@@ -630,6 +628,13 @@
return bu_units_conversion("mm");
}
+
+/*
+ * Prints a list of region areas sorted alphabetically reporting
+ * either the presented or exposed area 'type' and keeping track of
+ * the 'count' of regions printed. this routine returns the number of
+ * ray hits across all regions.
+ */
static size_t
print_region_area_list(size_t *count, struct rt_i *rtip, area_type_t type)
{
@@ -693,7 +698,7 @@
double factor = 1.0; /* show mm in parens by default */
/* show some common larger units in parens otherwise default to mm^2*/
- factor = set_factor();
+ factor = alternative_display_factor();
cell = listp->cell;
if (type == PRESENTED_AREA) {
@@ -831,7 +836,7 @@
double factor = 1.0; /* show mm in parens by default */
/* show some common larger units in parens otherwise default to mm^2*/
- factor = set_factor();
+ factor = alternative_display_factor();
cell = listp->cell;
while (indents-- > 0) {
@@ -920,7 +925,7 @@
}
/* show some common larger units in parens otherwise default to mm^2*/
- factor = set_factor();
+ factor = alternative_display_factor();
bu_log("\n"
"********************************************************************\n"
"WARNING: The terminology and output format of 'rtarea' is
deprecated\n"
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits