Revision: 54418
http://brlcad.svn.sourceforge.net/brlcad/?rev=54418&view=rev
Author: carlmoore
Date: 2013-02-14 22:05:50 +0000 (Thu, 14 Feb 2013)
Log Message:
-----------
use DEG2RAD in various places
Modified Paths:
--------------
brlcad/trunk/src/fb/polar-fb.c
brlcad/trunk/src/irprep/showtherm.c
brlcad/trunk/src/irprep/subroutines.c
brlcad/trunk/src/libged/bot_smooth.c
brlcad/trunk/src/proc-db/clutter.c
brlcad/trunk/src/proc-db/room.c
Modified: brlcad/trunk/src/fb/polar-fb.c
===================================================================
--- brlcad/trunk/src/fb/polar-fb.c 2013-02-14 21:46:33 UTC (rev 54417)
+++ brlcad/trunk/src/fb/polar-fb.c 2013-02-14 22:05:50 UTC (rev 54418)
@@ -401,7 +401,7 @@
/* Initialize things */
ProgName = *argv;
- angle_cvt = Deg2Rad = M_PI / 180.0;
+ angle_cvt = Deg2Rad = DEG2RAD;
FB_Name = "";
Interior = BI_RINGS;
Color[C_BKGRND][RED] = Color[C_BKGRND][GRN] = Color[C_BKGRND][BLU] = 255;
Modified: brlcad/trunk/src/irprep/showtherm.c
===================================================================
--- brlcad/trunk/src/irprep/showtherm.c 2013-02-14 21:46:33 UTC (rev 54417)
+++ brlcad/trunk/src/irprep/showtherm.c 2013-02-14 22:05:50 UTC (rev 54418)
@@ -513,8 +513,8 @@
ret = scanf("%lf %lf", &az, &el);
if (ret == 0)
perror("scanf");
- alpha = az * M_PI / 180.;
- beta = (-el) * M_PI / 180.;
+ alpha = az * DEG2RAD;
+ beta = (-el) * DEG2RAD;
calpha = cos(alpha);
salpha = sin(alpha);
cbeta = cos(beta);
Modified: brlcad/trunk/src/irprep/subroutines.c
===================================================================
--- brlcad/trunk/src/irprep/subroutines.c 2013-02-14 21:46:33 UTC (rev
54417)
+++ brlcad/trunk/src/irprep/subroutines.c 2013-02-14 22:05:50 UTC (rev
54418)
@@ -96,7 +96,7 @@
double b; /* Angle in radians. */
- b = a * M_PI / 180.;
+ b = a * DEG2RAD;
return b;
Modified: brlcad/trunk/src/libged/bot_smooth.c
===================================================================
--- brlcad/trunk/src/libged/bot_smooth.c 2013-02-14 21:46:33 UTC (rev
54417)
+++ brlcad/trunk/src/libged/bot_smooth.c 2013-02-14 22:05:50 UTC (rev
54418)
@@ -111,7 +111,7 @@
old_bot = (struct rt_bot_internal *)intern.idb_ptr;
RT_BOT_CK_MAGIC(old_bot);
- if (rt_bot_smooth(old_bot, old_bot_name, gedp->ged_wdbp->dbip,
tolerance_angle*M_PI/180.0)) {
+ if (rt_bot_smooth(old_bot, old_bot_name, gedp->ged_wdbp->dbip,
tolerance_angle*DEG2RAD)) {
bu_vls_printf(gedp->ged_result_str, "Failed to smooth %s\n",
old_bot_name);
rt_db_free_internal(&intern);
return GED_ERROR;
Modified: brlcad/trunk/src/proc-db/clutter.c
===================================================================
--- brlcad/trunk/src/proc-db/clutter.c 2013-02-14 21:46:33 UTC (rev 54417)
+++ brlcad/trunk/src/proc-db/clutter.c 2013-02-14 22:05:50 UTC (rev 54418)
@@ -100,9 +100,7 @@
BU_LIST_INIT(&head.l);
-/* Simplify the expression for sine of 60 degrees. */
-/* sin60 = sin(60.0 * M_PI / 180.0); */
- sin60 = sin(M_PI / 3.0);
+ sin60 = sin(60.0 * DEG2RAD);
outfp = wdb_fopen("clutter.g");
mk_id(outfp, "Procedural Clutter");
Modified: brlcad/trunk/src/proc-db/room.c
===================================================================
--- brlcad/trunk/src/proc-db/room.c 2013-02-14 21:46:33 UTC (rev 54417)
+++ brlcad/trunk/src/proc-db/room.c 2013-02-14 22:05:50 UTC (rev 54418)
@@ -92,9 +92,7 @@
BU_LIST_INIT(&head.l);
MAT_IDN(identity);
-/* Simplify the expression for sine of 60 degrees. */
-/* sin60 = sin(60.0 * M_PI / 180.0); */
- sin60 = sin(M_PI / 3.0);
+ sin60 = sin(60.0 * DEG2RAD);
outfp = wdb_fopen("room.g");
mk_id(outfp, "Procedural Rooms");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits