I'm new at the forum but I already try to find an answer for my question searching on it.
I have the next problem. I have a class with a PVector variable who is created in constructor. In the same class I have a function that calls to the variable, but I take an error saying: "cannot convert from void to PVector" referring to line 28.
the code:
class Segmento {
PVector puntoA, puntoB;
Segmento(float t_Ax, float t_Ay, float t_Bx, float t_By) { //constructor con puntos
this.puntoA = new PVector(t_Ax, t_Ay);
this.puntoB = new PVector(t_Bx, t_By);
}
Segmento(PVector t_A, PVector t_B) { //constructor con PVectores
this.puntoA=t_A;
this.puntoB=t_B;
}
void dibuja(color c_stro, int t_stro) { //dibjua y define color y grosor