문제

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