Lumapit sa pangunahing nilalaman

//ERDDAP/com.cohort.util/ScriptMath2/floorDiv

floorDiv

[JVM]
open fun floorDiv(num: Int, den: Int): Int

open fun floorDiv(num: Long, den: Long): Long

A div where the implied mod is always >=0. This is a consistent div for positive and negative numerators. For example, with regular division 1/2=0 and -1/2=0. But floorDiv(-1,2)=-1. den = 0 throws an exception.

Return

num/den, but is consistent for positive and negative numbers

Parameters

JVM

numthe numerator (a positive or negative number)
denthe denominator (a positive number)