简体   繁体   English

如何将此VB.net/C#代码移植到Objective-C / iOS?

[英]How to port this VB.net / C# code to Objective-C / iOS?

I need to do this in Objective-C / iOS: 我需要在Objective-C / iOS中执行此操作:

Math.Round(h, MidpointRounding.AwayFromZero)

I know we have a round() function, but how about that "AwayFromZero" option? 我知道我们有一个round()函数,但是该“ AwayFromZero”选项怎么样? What is the equivalent to use? 等效使用什么?

细胞

ceil(h)

Is there a ceil / ceiling function in Objective-C / iOS? 在Objective-C / iOS中有ceil / ceiling功能吗? It would have the same effect as your vb/c# code. 这将与您的vb / c#代码具有相同的效果。

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

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