最近看見一段代碼如下:
public final short Red;
public final short Green;
public final short Blue;
public ZLColor(int r, int g, int b) {
Red = (short)(r & 0xFF);
Green = (short)(g & 0xFF);
Blue = (short)(b & 0xFF);
}
我承認我沒用過,自己查閱的時候相關資料也很少,最後找到一份資料。漲知識了,同時這裏記錄一下