Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Euler and PI : Math.constants « Development « Ruby
Ruby
Development
Math.constants
Euler and PI
print Math::E # => 2.71828182845905 print Math::PI # => 3.14159265358979
Related examples in the same category
1.
To find out what constants Math (or any other module or class) has defined, use reflection by invoking the constants method
2.
Math.const_set and get