cos

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Cosine
<?php cos(float $num): float
<?php                 for ($i=0; $i<4; $i++) {

                    $x = $box[$i * 2];

                    $y = $box[$i * 2 + 1];

                    $box[$i * 2] = cos($angle) * $x - sin($angle) * $y;

                    $box[$i * 2 + 1] = sin($angle) * $x + cos($angle) * $y;

                }

            }
<?php                     $x = $box[$i * 2];

                    $y = $box[$i * 2 + 1];

                    $box[$i * 2] = cos($angle) * $x - sin($angle) * $y;

                    $box[$i * 2 + 1] = sin($angle) * $x + cos($angle) * $y;

                }

            }