php8.5
Home/ Manual/ math / functions/ rad2deg

rad2deg

PHP function Edit on GitHub ✎

(PHP 4, PHP 5, PHP 7, PHP 8)

Converts the radian number to the equivalent number in degrees

Description

rad2deg(float $num): float

This function converts num from radian to degrees.

Parameters

num

A radian value

Return Values

The equivalent of num in degrees

Examples

rad2deg() example

php
<?php

echo rad2deg(M_PI_4); // 45

?>

See Also

Source: reference/math/functions/rad2deg.xml · from the official PHP manual (php/doc-en)