Top Level Namespace

Defined Under Namespace

Classes: Face, Hashrander, Tiledenticon, Tiler, TilerBuilder

Instance Method Summary collapse

Instance Method Details

#max(*values) ⇒ Object

Return max of a series of values



90
91
92
# File 'lib/face.rb', line 90

def max(*values)
 values.max
end

#min(*values) ⇒ Object

Return min of a series of values



85
86
87
# File 'lib/face.rb', line 85

def min(*values)
 values.min
end

#min_max_to_i(min, max) ⇒ Object

Convert min axis, max axis tuple to an orientation index where axis is between 1 and 4 and min_axis < max_axis



11
12
13
14
15
# File 'lib/tiler.rb', line 11

def min_max_to_i min, max
  return max - 1 if min == 0
  return 1 + max if min == 1
  return 5
end