Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
int redsize = entry.getValue().getRed(); int bluesize = entry.getValue().getBlue(); if(redsize > bluesize) // difference at least 2.
redsize と bluesize の差が 2 より大きい場合、
しかし、どうすればこれを作ることができますか?
使用できます
if (Math.abs(redsize-bluesize) >= 2)
ドキュメンテーションはこちら。
あと2つ以上欲しいなら
if(redsize >= bluesize + 2)
2以上にしたい場合
if(redsize > bluesize + 2)
少なくとも 2 の違い。
if(Math.abs(redsize - bluesize) >= 2)
redsize と bluesize の差が 2 より大きい
if(Math.abs(redsize - bluesize) > 2)