File: ref_m_math.xml

package info (click to toggle)
rubybook 0.2-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,252 kB
  • ctags: 1,043
  • sloc: xml: 60,486; makefile: 25
file content (163 lines) | stat: -rw-r--r-- 4,009 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<ppdoc>
<copyright>
    Copyright (c) 2001 by Addison Wesley Longman.  This
    material may be distributed only subject to the terms and
    conditions set forth in the Open Publication License, v1.0 or
    later (the latest version is presently available at
    http://www.opencontent.org/openpub/).
</copyright>
<class name="Math" type="module">
<p/>
  The <modulename>Math</modulename> module contains module functions for basic
  trigonometric and transcendental functions.    
<p/>
  <constants>
<tr>
  <td>
  <constant>
       <constname>E</constname>
       <constval>2.718281828</constval>
       <constdesc>Value of e (base of natural
    logarithms)</constdesc>
     </constant>
<p/>
  <constant>
       <constname>PI</constname>
       <constval>3.141592654</constval>
       <constdesc>Value of PI</constdesc>
     </constant>
</td>
</tr>
</constants>
<p/>
  <methods type="class">
<p/>
        <method name="atan2" ref="atan2">
      <callseq>
        Math.atan2( <obj>y, x</obj> )
        <returns><obj>aFloat</obj></returns>
      </callseq>
      <desc>
<p/>
      Computes the arc tangent given <obj>y</obj> and <obj>x</obj>. Returns -PI..PI.
<p/>
      </desc>
    </method>
<p/>
        <method name="cos" ref="cos">
      <callseq>
        Math.cos( <obj>aNumeric</obj> )
        <returns><obj>aFloat</obj></returns>
      </callseq>
      <desc>
<p/>
      Computes the cosine of <obj>aNumeric</obj> (expressed 
      in radians).
      Returns -1..1.
<p/>
      </desc>
    </method>
<p/>
        <method name="exp" ref="exp">
      <callseq>
        Math.exp( <obj>aNumeric</obj> )
        <returns><obj>aFloat</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns e raised to the power of <obj>aNumeric</obj>.
<p/>
      </desc>
    </method>
<p/>
        <method name="frexp" ref="frexp">
      <callseq>
        Math.frexp( <obj>aNumeric</obj> )
        <returns><obj>anArray</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns a two-element array ([<obj>aFloat, aFixnum</obj>]) containing
      the normalized fraction and exponent of <obj>aNumeric</obj>.
<p/>
      </desc>
    </method>
<p/>
        <method name="ldexp" ref="ldexp">
      <callseq>
        Math.ldexp( <obj>aFloat</obj>, <obj>anInteger</obj> )
        <returns><obj>aFloat</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the value of <obj>aFloat</obj> *2<sup><obj>anInteger</obj></sup>.
<p/>
      </desc>
    </method>
<p/>
        <method name="log" ref="log">
      <callseq>
        Math.log( <obj>aNumeric</obj> )
        <returns><obj>aFloat</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the natural logarithm of <obj>aNumeric</obj>.
<p/>
      </desc>
    </method>
<p/>
        <method name="log10" ref="log10">
      <callseq>
        Math.log10( <obj>aNumeric</obj> )
        <returns><obj>aFloat</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the base 10 logarithm of <obj>aNumeric</obj>.
<p/>
      </desc>
    </method>
<p/>
        <method name="sin" ref="sin">
      <callseq>
        Math.sin( <obj>aNumeric</obj> )
        <returns><obj>aFloat</obj></returns>
      </callseq>
      <desc>
<p/>
      Computes the sine of <obj>aNumeric</obj> (expressed in 
      radians). Returns -1..1.
<p/>
      </desc>
    </method>
<p/>
        <method name="sqrt" ref="sqrt">
      <callseq>
        Math.sqrt( <obj>aNumeric</obj> )
        <returns><obj>aFloat</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the non-negative square root of <obj>aNumeric</obj>.
      Raises <exception>ArgError</exception> if <obj>aNumeric</obj> is less than zero.
<p/>
      </desc>
    </method>
<p/>
        <method name="tan" ref="tan">
      <callseq>
        Math.tan( <obj>aNumeric</obj> )
        <returns><obj>aFloat</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the tangent of <obj>aNumeric</obj> (expressed in radians).
<p/>
      </desc>
    </method>
<p/>
  </methods>
<p/>
</class>
</ppdoc>