S
S
sdsf [email protected]2014-09-25 16:42:24
Geometry
sdsf [email protected], 2014-09-25 16:42:24

Ayyyva ayvfyvfyvfyvay?

dfsdfsdfsdf sdfsdfsdf sdfdsfdsfsd

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Ezhgurov, 2014-09-25
dmtpln

I wonder how old you are if you don’t know the school geometry course?

$alpha=atan2($H, $W); // Угол диагонали
$alpha_1=$alpha+$A*PI/180; // Новый угол первой диагонали
$alpha_2=$alpha_1+PI-2*$alpha; // Новый угол второй диагонали
$H_new=max(abs(sin($alpha_1)), abs(sin($alpha_2)))*sqrt($H*$H+$W*$W); // Длина проекции на ось Y
$W_new=max(abs(cos($alpha_1)), abs(cos($alpha_2)))*sqrt($H*$H+$W*$W); // Длина проекции на ось X
// Искомый результат
$dH=round(($H_new-$H)/2);
$dW=round(($W_new-$W)/2);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question