简体   繁体   English

Java中等效的Anylogic函数“ zidz”是什么?

[英]What is the equivalent Anylogic function “zidz” in Java?

In Anylogic there is a built-in function zidz , which does the following: 在Anylogic中,有一个内置函数zidz ,它可以执行以下操作:

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. 如果结果是无穷大或不是数字,则返回0,否则返回除法结果。

My question for you guys is: do you know a function that does the same operation but in Java? 我对你们的问题是:您知道一个功能与Java相同的功能吗?

I've searched and come up with Math#IEEEremainder , but I don't think it does the exact same thing as 'zidz'. 我已经搜索并提出了Math#IEEEremainder ,但我认为它的功能与'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. 这并不是说世界上没有人编写和发布过一个函数,但是该函数非常琐碎,不可能包含在Java库中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM