MathPHP\LinearAlgebra\VectorAxiomsTest::testProjPerpPerpDotProductEqualsProductOfLengths PHP Метод

testProjPerpPerpDotProductEqualsProductOfLengths() публичный Метод

Axiom: |projᵇA⊥ ⋅ perpᵇA| = |projᵇA| |perpᵇA| Absolute value of proj and perp dot product equals product of their lengths.
    public function testProjPerpPerpDotProductEqualsProductOfLengths(array $A, array $B)
    {
        $A = new Vector($A);
        $B = new Vector($B);
        $projᵇA = $A->projection($B);
        $projᵇA⊥ = $A->projection($B)->perpendicular();
        $perpᵇA = $A->perp($B);
        $projᵇA⊥⋅perpᵇA = abs($projᵇA⊥->dotProduct($perpᵇA));
        $│projᵇA│ = $projᵇA->length();
        $│perpᵇA│ = $perpᵇA->length();
        $this->assertEquals($projᵇA⊥⋅perpᵇA, $│projᵇA│ * $│perpᵇA│);
    }