Module: VeryAnts::Int

Included in:
Integer
Defined in:
lib/very_ants/int.rb

Instance Method Summary collapse

Instance Method Details

#divide(x, y, c) ⇒ Object



15
16
17
# File 'lib/very_ants/int.rb', line 15

def divide(x, y, c)
  divide_helper(x, y, c).first
end

#minus(x, y, c) ⇒ Object



7
8
9
# File 'lib/very_ants/int.rb', line 7

def minus(x, y, c)
  helper(x, -1, y, c)
end

#mod(x, y, c) ⇒ Object



19
20
21
# File 'lib/very_ants/int.rb', line 19

def mod(x, y, c)
  divide_helper(x, y, c).last
end

#mult(x, y, c) ⇒ Object



11
12
13
# File 'lib/very_ants/int.rb', line 11

def mult(x, y, c)
  helper(0, x, y, c)
end

#plus(x, y, c) ⇒ Object



3
4
5
# File 'lib/very_ants/int.rb', line 3

def plus(x, y, c)
  helper(x, 1, y, c)
end