คือว่าผมจะ return ค่าของ return Math.sqrt(Math.pow(xCenter-x2,2)+ Math.pow(yCenter-y2,2)); แต่อีกคลาส มันหา เม็ดตอด ไม่เจออะครับ
พอใส่ static เข้าไป คำสั่งข้างใน error เลย
double Distance(double TheDistanceX , double TheDistanceY ){
x2 = TheDistanceX;
y2 = TheDistanceY;
return Math.sqrt(Math.pow(xCenter-x2,2)+ Math.pow(yCenter-y2,2));
}
ช่วยทีครับ!! การ return ค่ากลับ java
พอใส่ static เข้าไป คำสั่งข้างใน error เลย
double Distance(double TheDistanceX , double TheDistanceY ){
x2 = TheDistanceX;
y2 = TheDistanceY;
return Math.sqrt(Math.pow(xCenter-x2,2)+ Math.pow(yCenter-y2,2));
}