Method: Numeric#second
- Defined in:
- lib/core_ext/numeric.rb
#second ⇒ Object Also known as: seconds, secs, sec
Provides the suffix ‘second’ which will translate seconds to game ticks. This is to allow for a number of seconds to be expressed in situations where game ticks are used (e.g. animations).
33 34 35 |
# File 'lib/core_ext/numeric.rb', line 33 def second (self * 1000 / Numeric.tick_interval).floor end |