我只是在检查一个双变量的值是否为空,奇怪的是,一个错误提示“operator == is undefined for double”?
代码:
public double getGyro_X() {
if (this.gyro_X == null) {
Toast.makeText(this, ""+gyro_XIsNullText, ToastdurationShort).show();
} else {
return this.gyro_X;
}
}