Comments on Profile Post by SweetMeltyLove

  1. Tea's Jams
    Tea's Jams
    Er, the code is mathing badly
    Nov 18, 2017
  2. BixHD
    BixHD
    IIRC ruby doesn't return any floats (decimals) unless a number in an operation is a float, so just add a .0 to one of the numbers for it to print the right number
    Nov 18, 2017
  3. SweetMeltyLove
    SweetMeltyLove
    @just1witness Yeah just figured out I need to do 16.0/6 so it knows I WANT decimals u.u
    Nov 18, 2017
    Tea's Jams likes this.
  4. Llareian
    Llareian
    Nov 18, 2017
  5. cabfe
    cabfe
    That's because you're only using integers.
    Divide by 6.0 to get 2.66(...)
    Nov 18, 2017
  6. taarna23
    taarna23
    Yup in most (all?) programming languages, integer division will truncate the decimals and only return an integer.
    Nov 18, 2017