Revision: 54415
          http://brlcad.svn.sourceforge.net/brlcad/?rev=54415&view=rev
Author:   carlmoore
Date:     2013-02-14 21:38:02 +0000 (Thu, 14 Feb 2013)
Log Message:
-----------
make use of M_PI , DEG2RAD , RAD2DEG

Modified Paths:
--------------
    brlcad/trunk/include/vmath.h
    brlcad/trunk/src/tclscripts/lib/Ged.tcl
    brlcad/trunk/src/tclscripts/mged/anim.tcl

Modified: brlcad/trunk/include/vmath.h
===================================================================
--- brlcad/trunk/include/vmath.h        2013-02-14 20:31:39 UTC (rev 54414)
+++ brlcad/trunk/include/vmath.h        2013-02-14 21:38:02 UTC (rev 54415)
@@ -1558,10 +1558,10 @@
 }
 
 #define QUAT_FROM_VROT_DEG(q, r, v) \
-       QUAT_FROM_VROT(q, ((r)*(M_PI/180.0)), v)
+       QUAT_FROM_VROT(q, ((r)*DEG2RAD), v)
 
 #define QUAT_FROM_ROT_DEG(q, r, x, y, z) \
-       QUAT_FROM_ROT(q, ((r)*(M_PI/180.0)), x, y, z)
+       QUAT_FROM_ROT(q, ((r)*DEG2RAD), x, y, z)
 
 
 /**

Modified: brlcad/trunk/src/tclscripts/lib/Ged.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/lib/Ged.tcl     2013-02-14 20:31:39 UTC (rev 
54414)
+++ brlcad/trunk/src/tclscripts/lib/Ged.tcl     2013-02-14 21:38:02 UTC (rev 
54415)
@@ -4037,7 +4037,7 @@
     }
 
     set cos [vdot $A $B]
-    set angle [format "%.2f" [expr {acos($cos) * (180.0 / 3.141592653589793)}]]
+    set angle [format "%.2f" [expr {acos($cos) * RAD2DEG}]]
 
     if {[llength $mViewMeasureCallbacks] == 0} {
        set mstring "Measured Distance (Leg 2):  $delta [$mGed units 
-s]\nMeasured Angle:  $angle"

Modified: brlcad/trunk/src/tclscripts/mged/anim.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/mged/anim.tcl   2013-02-14 20:31:39 UTC (rev 
54414)
+++ brlcad/trunk/src/tclscripts/mged/anim.tcl   2013-02-14 21:38:02 UTC (rev 
54415)
@@ -2059,7 +2059,7 @@
 
     foreach script $slist {
        if {$script != ""} {
-           regsub -all {@pi} $script 3.14159265358979323846 temp2
+           regsub -all {@pi} $script M_PI temp2
            regsub -all {@e} $temp2 2.7182818284590452354 temp
            regsub -all {(@)([in])} $temp {$column(\2)} \
                script

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

Reply via email to