Matthew Lindfield Seager

Matthew Lindfield Seager

Notes to future self:

  1. Watch out for integer division!
    9 / 10 # => 0 🤔

  2. Order of operations matters!
    Float(9/10) # => 0.0 🤔🤔

  3. Ruby has you covered!
    Float(9)/10 # => 0.9 😀
    9.to_f/10 # => 0.9 😀
    9.fdiv(10) # => 0.9 😀