public function addPoint($X, $Y, $Value, $Force = true)
    {
        if ($X < 0 || $X > $this->GridSizeX) {
            return 0;
        }
        if ($Y < 0 || $Y > $this->GridSizeY) {
            return 0;
        }

        if ($this->Points[$X][$Y] == UNKNOWN || $Force) {
            $this->Points[$X][$Y] = $Value;
        } elseif ($this->Points[$X][$Y] == UNKNOWN) {
            $this->Points[$X][$Y] = $Value;
        } else {
            $this->Points[$X][$Y] = ($this->Points[$X][$Y] + $Value) / 2;
        }
    }
public function addPoint($X, $Y, $Value, $Force = true)
    {
        if ($X < 0 || $X > $this->GridSizeX) {
            return 0;
        }
        if ($Y < 0 || $Y > $this->GridSizeY) {
            return 0;
        }

        if ($this->Points[$X][$Y] == UNKNOWN || $Force) {
            $this->Points[$X][$Y] = $Value;
        } elseif ($this->Points[$X][$Y] == UNKNOWN) {
            $this->Points[$X][$Y] = $Value;
        } else {
            $this->Points[$X][$Y] = ($this->Points[$X][$Y] + $Value) / 2;
        }
    }
public function addPoint ( $ X , $ Y , $ Value , $ Force = true ) { if ( $ X < 0 || $ X > $ this -> GridSizeX ) { return 0 ; } if ( $ Y < 0 || $ Y > $ this -> GridSizeY ) { return 0 ; } if ( $ this -> Points [ $ X ] [ $ Y ] == UNKNOWN || $ Force ) { $ this -> Points [ $ X ] [ $ Y ] = $ Value ; } elseif ( $ this -> Points [ $ X ] [ $ Y ] == UNKNOWN ) { $ this -> Points [ $ X ] [ $ Y ] = $ Value ; } else { $ this -> Points [ $ X ] [ $ Y ] = ( $ this -> Points [ $ X ] [ $ Y ] + $ Value ) / 2 ; } }
Add a point on the grid
@param int $X
@param int $Y
@param int|float $Value
@param boolean $Force
@return null
Add a point on the grid