簡體   English   中英

有人可以幫我翻譯 java 中的這行代碼嗎?

[英]Can someone help me to translate this line of code in java?

if (area >= 30 &&
    std::abs(1 - ((double)rect.width / (double)rect.height)) <= 0.2 && 
    std::abs(1 - (area / (CV_PI * std::pow(radius, 2)))) <= 0.2)

我要翻譯的是std::absCV_PI * std::pow

我在網上搜索了相當於 java 的std::abs ,但沒有找到。 請幫忙。 無法搜索CV_PI * std::pow因為我仍然找不到std::abs

查看Math class。

https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html

 Math.PI
 Math.pow(...)
 Math.abs(...)
 etc.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM