Return new instance of Num with floor value e.g. for 3.5 -> 3.0

@return
165884
public Num floor() {
		Num floor = new Num();
		BigDecimal c = this.toBigDecimal();
		floor.setValue(c.setScale(0, BigDecimal.ROUND_FLOOR), null, null);
		return floor;
	}
994087
public static Double floor(Double a) {
		return a==null ? null : Math.floor(a);
	}
196738
@SuppressWarnings({ "checkstyle:magicnumber", "checkstyle:returncount" })
	public static Level fromInt(int num) {
		switch (num) {
		case 0:
			return Level.OFF;
		case 1:
			return Level.SEVERE;
		case 2:
			return Level.WARNING;
		case 3:
			return Level.INFO;
		case 4:
			return Level.FINE;
		case 5:
			return Level.FINER;
		case 6:
			return Level.FINEST;
		case 7:
			return Level.ALL;
		default:
			if (num < 0) {
				return Level.OFF;
			}
			return Level.ALL;
		}
	}
304029
public static Version getInstance(
		int major,
		int minor,
		int release,
		int build
	) {
		return new Version(major, minor, release, build);
	}
185314
function(places) {

      places = Math.pow(10, places || 0);

      if (isNaN(this["n"]) || isNaN(this["d"])) {
        return new Fraction(NaN);
      }
      return new Fraction(Math.floor(places * this["s"] * this["n"] / this["d"]), places);
    }
670491
def new(cls, num_id, abstractNum_id):
        
        num = OxmlElement('w:num')
        num.numId = num_id
        abstractNumId = CT_DecimalNumber.new(
            'w:abstractNumId', abstractNum_id
        )
        num.append(abstractNumId)
        return num
1219049
public T grow() {
		if( size >= data.length) {
			T a = createInstance();
			add(a);
			return a;
		} else {
			T a = data[(start+size)%data.length];
			if( a == null ) {
				data[(start+size)%data.length] = a = createInstance();
			}
			size++;
			return a;
		}
	}
274538
protected String newAlgorithm()
	{
		if (getModel().getAlgorithm() == null)
		{
			return SunJCEAlgorithm.PBEWithMD5AndDES.getAlgorithm();
		}
		return getModel().getAlgorithm().getAlgorithm();
	}
950166
def floor(value, mod=1):
    
    if value == None:
        return None
    elif mod <= 0:
        return None
    elif mod == 1:
        return int(math_floor(value))
    elif is_integer(mod):
        return int(math_floor(value / mod)) * mod
    else:
        return math_floor(value / mod) * mod
537413
public static <K> NumberMap<K, BigDecimal> newBigDecimalMap() {
		return new NumberMap<K, BigDecimal>() {
			@Override
			public void add(K key, BigDecimal addend) {
				put(key, containsKey(key) ? get(key).add(addend) : addend);
			}
			@Override
			public void sub(K key, BigDecimal subtrahend) {
				put(key, (containsKey(key) ? get(key) : BigDecimal.ZERO).subtract(subtrahend));
			}
		};
	}
503246
public static String formatNumber(int num) {
        DecimalFormat format = new DecimalFormat();
        format.setDecimalSeparatorAlwaysShown(false);
        return format.format(num);
    }
752638
public static MonetaryAmountDecimalFormatBuilder newInstance() {
        MonetaryAmountDecimalFormatBuilder builder = new MonetaryAmountDecimalFormatBuilder();
        builder.decimalFormat = (DecimalFormat) NumberFormat.getCurrencyInstance();
        return builder;
    }
1015267
public static function floor($number)
    {
        if (self::compare($number, 0) == 1) {
            $result = bcadd($number, '0', 0);
        } else {
            $result = bcadd($number, '-1', 0);
        }

        return $result;
    }
1349560
public static int floor(int n, int m) {
        return n >= 0 ? (n / m) * m : ((n - m + 1) / m) * m;
    }
677799
public static <T extends Number> ImmutableNumberStatistics<T> copyOf(NumberStatistics<? extends T> statistics){
		return new ImmutableNumberStatistics<T>(statistics);
	}
1084162
public Tile getLeft() {
        int x = tileX - 1;
        if (x < 0) {
            x = getMaxTileNumber(this.zoomLevel);
        }
        return new Tile(x, this.tileY, this.zoomLevel, this.tileSize);
    }
355439
public <T extends Number & Comparable> NumberRange by(T stepSize) {
        return new NumberRange(NumberRange.comparableNumber((Number)from), NumberRange.comparableNumber((Number)to), stepSize, inclusive);
    }