我在netbeans的maven項目中有以下行。找不到符號(它在那裏)
Projection projection = two.translate(Vector.reg1).projection(direction);
兩者是一個Shape實例。
public abstract class Shape {
public double mass;
public double momentOfIntertia;
public Vector center;
public abstract List<Edge> normals(Vector direction);
public abstract Projection projection(Vector line);
public abstract Shape transform(Transformation transformation);
public abstract Shape translate(Vector translation);
public abstract void render(Graphics graphics);
}
當我編譯我得到這個錯誤。
[ERROR]BUILD FAILURE
------------------------------------------------------------------------
Compilation failure
org/curious/pounce/Collision.java:[89,39] cannot find symbol
symbol : method translate(org.curious.pounce.math.Vector)
location: class org.curious.pounce.Shape
我不確定這可能是什麼問題,如果有什麼錯誤netbeans應該指出在IDE中的錯誤,它不是。