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
Math Operators « Language Basics « Ruby
Ruby
Language Basics
Math Operators
1.
get acquainted with math operations in Ruby
2.
Using Math Operators
3.
A few of Ruby's assignment operators
4.
Some of the operators have assignment shortcuts
5.
unary operators, + and -, which indicate negative and positive numbers
6.
methods such as div, modulo, divmod, quo, and remainder.
7.
Division and Truncation
8.
be careful when you use the div method
9.
Abbreviated Assignment Operators
10.
note Ruby does not have ++