Adds another velocity to this instance and returns a new instance with
the sum.

@param Velocity $b Velocity to add

@return static Sum of the two velocity instances
167628
public function add(Velocity $b)
    {
        $dist     = $this->dist->add($b->dist);
        $velocity = new Velocity($dist, $this->time);

        $velocity->format = $this->format;

        return $velocity;
    }
747566
public Matrix add(Matrix B)
    {
        Matrix toReturn = getThisSideMatrix(B);
        toReturn.mutableAdd(1.0, B);
        return toReturn;
    }
174825
public function append(Box $b) : Box
    {
        if ($this->next === null && $b->prev === null) {
            $this->next = $b;
            $b->prev = $this;
        } else {
            $this->tail()->append($b->head());
        }
        return $this;
    }
317364
public function Add($a, $b)
    {
        $this->preOpMethodParamsCheck(array($a, $b));

        return $this->math->add($a, $b);
    }
1170474
public function add($goal)
    {
        if (is_array($goal)) {
            $this->collection[] = new Goal($goal);
        } elseif (is_object($goal) && $goal instanceof Goal) {
            $this->collection[] = $goal;
        }

        return $this;
    }
458837
function add(Expr $next) {
		if ($this->isNull()) {
			throw new \UnexpectedValueException("Cannot add anything to NULL");
		}
		if ($this->next) {
			$this->next->add($next);
		} else {
			$this->next = $next;
		}
		return $this;
	}
803078
public function add()
    {
        $translation = $this->Translations->newEntity();
        if ($this->request->is('post')) {
            $data = is_array($this->request->getData()) ? $this->request->getData() : [];
            $translation = $this->Translations->patchEntity($translation, $data);
            $result = $this->Translations->save($translation);
            if ($result) {
                $this->Flash->success((string)__('The translation has been saved.'));

                return $this->redirect(['action' => 'index']);
            }
            $this->Flash->error((string)__('The translation could not be saved. Please, try again.'));
        }
        $languages = $this->Translations->Languages->find('all', ['limit' => 200]);
        $this->set(compact('translation', 'languages'));
        $this->set('_serialize', ['translation']);
    }
579146
public function augmentLeft(Matrix $b) : self
    {
        if ($this->m > 0 and $b->m() !== $this->m()) {
            throw new DimensionalityMismatchException('Matrix A requires'
                . " $this->m columns but Matrix B has {$b->m()}.");
        }

        $b = array_map('array_merge', $b->asArray(), $this->a);

        return self::quick($b);
    }
1188117
public static function add(/** polymorphic **/)
    {
       $args = func_get_args();
       $that = self::get_this($args);
       $term = self::get_term($args);

       $url = URIResource::Make($that->path, array($that->id, $term));

       $id = Locator::Find($that->client->post($url, $args->get()));
        
       return $this->$term($id);
    }
503926
public function add()
    {
        $args = func_get_args();
        foreach( $args as $arg ) {
            if( is_array($arg) ) {
                foreach( $arg as $value ) {
                    $this[] = $value;
                }
            } else {
                $this[] = $arg;
            }
        }
        return $this;
    }
334840
public function mod($b)
    {
        switch (true) {
            case $b instanceof Vector:
                $c = $this->modVector($b);
                break;

            case $b instanceof Matrix:
                $c = $this->modMatrix($b);
                break;

            case is_int($b) or is_float($b):
                $c = $this->modScalar($b);
                break;

            default:
                throw new InvalidArgumentException('Cannot mod vector'
                    . ' with a ' . gettype($b) . '.');
        }

        return $c;
    }
656611
public static function add($z, $w) {
        if (!($z instanceof Complex)) $z = static::parse($z);
        if (!($w instanceof Complex)) $w = static::parse($w);

        return static::create($z->x + $w->x, $z->y + $w->y);
    }
476131
public function add(string $a, string $b, $distance, bool $addInverseEdge = true) : Graph
    {
        if (!is_numeric($distance)) {
            return false;
        }
        $distance = floatval($distance);
        $this->total_cost   += $distance;
        $this->nodes[$a][$b] = $distance;

        if ($addInverseEdge) {
            $this->nodes[$b][$a] = $distance;
        }
        return $this;
    }
1136544
public function add($amount)
    {
        if ($amount instanceof FeeContract) {
            $amount = $amount->get($this);
        }

        throw_unless($amount instanceof Amount, BadMethodCallException::class);

        return new static(
            $this->amount + $amount->convertTo($this->currency())->amount,
            $this->currency()
        );
    }
758728
public function add($x = 0, $y = 0) {
		$this->width += $x;
		$this->height += $y;
		return $this;
	}
430928
public function sub(Distance $b)
    {
        return Distance::m(bcsub($this->m, $b->m), static::$s);
    }
691394
public function add(Vector $v) {
		if($this->dimension != $v->getDimensions()) {
			throw new Exception("Both vectors must have the same size");
		}

		$components = array();
		$otherComponents = $v->toArray();
		foreach($this->components as $i => $component) {
			$components[] = $component + $otherComponents[$i];
		}
		$this->components = $components;
		return $this;
	}