Question

In Anylogic there is a built-in function zidz, which does the following:

zidz(double a, double b)

Description

Tries to divide the first argument by the second. If the result is infinity or not a number, returns 0, otherwise returns the division result.

My question for you guys is: do you know a function that does the same operation but in Java?

I've searched and come up with Math#IEEEremainder, but I don't think it does the exact same thing as 'zidz'.

Was it helpful?

Solution

There isn't one in the common set of libraries. That's not to say there is nobody in the world who has written and published one, but the function is so trivial as to be unlikely to be included in a Java library.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top