<?xml version="1.0" encoding="windows-1252"?>
<node id="1015502" title="Re: How to use rad2rad" created="2013-01-26 10:40:47" updated="2013-01-26 10:40:47">
<type id="11">
note</type>
<author id="968231">
Athanasius</author>
<data>
<field name="doctext">
&lt;p&gt;Hello [Masayoshi Fujimoto], and welcome to the Monastery!&lt;/p&gt;

&lt;p&gt;The function &lt;c&gt;rad2rad&lt;/c&gt; is not exported by the [doc://Math::Trig] module, so to use it you need to put the full module name in front:&lt;/p&gt;

&lt;code&gt;
my $radians_wrapped_by_2pi = Math::Trig::rad2rad($radians);
&lt;/code&gt;

&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt; Here is an example of &lt;c&gt;rad2rad()&lt;/c&gt; in use:&lt;/p&gt;

&lt;code&gt;
use Modern::Perl;
use Math::Trig ':pi';

my $radians = 4.5 * pi;
my $radians_wrapped_by_2pi = Math::Trig::rad2rad($radians);

say 'rad2rad(', $radians, ') = ', $radians_wrapped_by_2pi;
&lt;/code&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;code&gt;
 1:49 &gt;perl 502_SoPW.pl
rad2rad(14.1371669411541) = 1.5707963267949

 1:49 &gt;
&lt;/code&gt;

&lt;p&gt;Hope that helps,&lt;/p&gt;

&lt;div class="pmsig"&gt;&lt;div class="pmsig-968231"&gt;
&lt;p&gt;
&lt;table width="100%"&gt;
&lt;tr&gt;
  &lt;td align="left"&gt;
    Athanasius&amp;emsp;&lt;font color="#008000"&gt;&amp;lt;&lt;/font&gt;[href://http://www.biblegateway.com/passage/?search=John%203:16&amp;version=NLV|&lt;font color="#008000"&gt;&amp;deg;&lt;/font&gt;]&lt;font color="#008000"&gt;(((&amp;gt;&amp;lt;&lt;/font&gt;&amp;emsp;&lt;i&gt;contra mundum&lt;/i&gt;
  &lt;/td&gt;
  &lt;td align="right"&gt;
    [href://http://translate.google.com.au/#la/en/Iustus%20alius%20egestas%20vitae%2C%20eros%20Piratica%2C|&lt;b&gt;Iustus alius egestas vitae, eros Piratica,&lt;/b&gt;]
  &lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1015501</field>
<field name="parent_node">
1015501</field>
</data>
</node>
