x=$ux; $this->y=$uy; } function kysiX(){ return $this->x; } function kysiY(){ return $this->y; } function liida($teine){ return new Vektor($this->x+$teine->kysiX(), $this->y+$teine->kysiY()); } function vastandVektor(){ return new Vektor(-$this->x, -$this->y); } } ?>