Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 6d36cb72372cfb7c8fee63f4d6dc0530 > files > 29

ruby-docs-1.8.5-31.el5_9.x86_64.rpm

<HTML>
<HEAD>
<TITLE>Numeric</TITLE>
</HEAD>
<BODY text="#000000" bgcolor="#FFFFFF">
<A HREF="Class.html">prev</A>
-
<A HREF="classes.html#classes">up</A>
-
<A HREF="Integer.html">next</A>
-
<A HREF="index.html">index</A>
<HR>
<dl>
<dt> <H1>Numeric</H1>
<dd> 
<P>
<code>Numeric</code> is the abstract class for the numbers.
</P>
<dt> <h2>SuperClass:</h2>
<dd> 
<dl>
<dt> <A HREF="Object.html"><code>Object</code></A>
</dl>
<dt> <h2>Included Modules:</h2>
<dd> 
<dl>
<dt> <A HREF="Compar.html"><code>Comparable</code></A>
</dl>
<dt> <h2>Methods:</h2>
<dd> 
<DL COMPACT>

<DT>
<A NAME="uplus">
<CODE>+ self</CODE></A>
<DD>
<p>
Returns <code>self</code>.
</p>

<DT>
<A NAME="uminus">
<CODE>- self</CODE></A>
<DD>
<p>
Returns negation of <code>self</code>.
</p>

<DT>
<A NAME="cmp"><CODE>self &lt;=&gt; other</CODE></A>
<DD>
<p>
Returns -1, 0, or 1 depending on whether the left argument is numerically
less than, equal to, or greater than the right argument.
</p>

<DT>
<A NAME="abs">
<CODE>abs</CODE></A>
<DD>
<p>
Returns absolute value of <code>self</code>.
</p>

<DT>
<A NAME="chr"><CODE>chr</CODE></A>
<DD>
<p>
Returns the string that contains the character represented
by that <code>Integer(self)</code> in the ASCII character set.
For example, <code>65.chr</code> is <code>"A"</code>.
</p>

<DT>
<A NAME="coerce">
<CODE>coerce(<VAR>number</VAR>)</CODE></A>
<DD>
<p>
Converts <code>self</code> and the <var>number</var> into
mutually calculatable numbers. 
</p>

<DT>
<A NAME="divmod">
<CODE>divmod(<VAR>other</VAR>)</CODE></A>
<DD>
<p>
Returns a pair of the quotient and remainder by <var>other</var>.
</p>

<DT>
<A NAME="integer_p"><CODE>integer?</CODE></A>
<DD>
<p>
Returns true if the receiver is integer.
</p>

<DT>
<A NAME="nonzero_p"><CODE>nonzero?</CODE></A>
<DD>
<p>
Returns <code>false</code> on zero, the <code>self</code> otherwise.
</p>

<DT>
<A NAME="to_f"><CODE>to_f</CODE></A>
<DD>
<p>
Converts <code>self</code> into a floating-point number.
</p>

<DT>
<A NAME="to_i">
<CODE>to_i</CODE></A>
<DD>
<p>
Returns an integer converted from <code>self</code>.
</p>

<DT>
<A NAME="zero_p"><CODE>zero?</CODE></A>
<DD>
<p>
Returns <code>true</code> on zero.
</p>
</DL>
</dl>

<HR>
<A HREF="Class.html">prev</A>
-
<A HREF="classes.html#classes">up</A>
-
<A HREF="Integer.html">next</A>
-
<A HREF="index.html">index</A>
<P ALIGN=right><A HREF="mailto:matz@netlab.co.jp">matz@netlab.co.jp</A></P>
</BODY>
</HTML>