Mysql Radians Function

MySQL: RADIANS Function

This tutorial explains how to use the MySQL RADIANS function with syntax and examples.

Description

The MySQL RADIANS function a value in degrees to radians.

Syntax

The syntax for the RADIANS function in MySQL is:

RADIANS( number )

Parameters or Arguments

number

An angle in degrees to convert to radians.

Note

  • See also the DEGREES and PI functions.
  • 180 degrees = \xcf\x80 radians

Applies To

The RADIANS function can be used in the following versions of MySQL:

  • MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23

Example

Let's look at some MySQL RADIANS function examples and explore how to use the RADIANS function in MySQL.

For example:

mysql> SELECT RADIANS(45);
Output: 0.7853981633974483

mysql> SELECT RADIANS(180);
Output: 3.141592653589793

mysql> SELECT RADIANS(0);
Output: 0

mysql> SELECT RADIANS(-45);
Output: -0.7853981633974483