Skip to main content
Commonmark migration
Source Link

#PHP (75 chars)

PHP (75 chars)

function L($u,$v){return[$s=($v[1]-$u[1])/($v[0]-$u[0]),$v[1]-($s*$v[0])];}

test : print_r(L([0,0],[7,1]));

output :

Array
(
    [0] => 0.14285714285714
    [1] => 0
)

(thanks @ace)

#PHP (75 chars)

function L($u,$v){return[$s=($v[1]-$u[1])/($v[0]-$u[0]),$v[1]-($s*$v[0])];}

test : print_r(L([0,0],[7,1]));

output :

Array
(
    [0] => 0.14285714285714
    [1] => 0
)

(thanks @ace)

PHP (75 chars)

function L($u,$v){return[$s=($v[1]-$u[1])/($v[0]-$u[0]),$v[1]-($s*$v[0])];}

test : print_r(L([0,0],[7,1]));

output :

Array
(
    [0] => 0.14285714285714
    [1] => 0
)

(thanks @ace)

Source Link

#PHP (75 chars)

function L($u,$v){return[$s=($v[1]-$u[1])/($v[0]-$u[0]),$v[1]-($s*$v[0])];}

test : print_r(L([0,0],[7,1]));

output :

Array
(
    [0] => 0.14285714285714
    [1] => 0
)

(thanks @ace)