Path: | lib/more/facets/infinity.rb |
Last Update: | Mon Mar 16 08:45:52 -0400 2009 |
A full featured Infinity class, supporting signed direction. Inifinty is a multiton based on direction The constant INFINITY is provided as the common case with direction=+1 (positive).
Besides being an class, these four constants are preset:
NaN Inf PosInf NegInf
These four constants a built from two other basic constants:
UNDEFINED INFINITY
In physical memory there are actually only three objects, namely three instances of InfinityClass, one for NaN, PosInf and NegInf, respectively.
Copyright (c) 2004 Thomas Sawyer
Ruby License
This module is free software. You may use, modify, and/or redistribute this software under the same terms as Ruby.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.