As we learned last time, one degree in radians is pi divided by 180 degrees. That means one radian in degrees is 180 degrees divided by pi.

But you don’t have to know any of that to use this function which does the calculation for you. It’s basically the reverse of deg2rad() - you put in radians and get out degrees.

$one_radian_in_deg = 180 / M_PI; // 57.2957795131
 
// convert radians to degrees
$rad = M_PI / 4;
 
$to_deg = $rad * (180 / M_PI); // 45
$to_deg = rad2deg($rad);       // 45