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'.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top