Round number to lower, no matter what

Discussion in 'Spigot Plugin Development' started by Nighterance, May 2, 2017.

  1. Hello!
    I am getting number from config file, witch can be, for example, 1,783 or 1,23432.

    I need to round that number to lower part, not as teached in math, so if I have 1,783 I need output 1, if I have 2,22 i need output 2, if i have 3,9999999 I still need output 3. Any ideas?
    Thanks!
     
  2. cast your variable to an int
     
    • Informative Informative x 1
  3. java.lang.Math#floor
     
    • Winner Winner x 1