Home > T-SQL > SQL SERVER Radians() and Degrees() – SQL Math Functions @SQLSERVER

SQL SERVER Radians() and Degrees() – SQL Math Functions @SQLSERVER


RADIANS() function returns the radian of a degree value. This function returns the same type of the numeric expression.

Syntax

RADIANS ( degree numeric expression )

DEGREES() function returns the degree or angle of a radians value. This function returns the same type of the numeric expression.

Syntax

DEGREES ( radians numeric expression )

Infographic

Degree-Radian_Conversion.svgSource: Wikipedia

Examples

–Float Degree value
select RADIANS(90.0)
Output: 1.570796326794896600
 
–Negative integer degree value
select RADIANS(-45)
Output: 0
 
–Float Radians value
select DEGREES(1.5)
Output: 85.943669269623484000
 
–Positive integer radians
select DEGREES(2)
Output: 114

Calculating Radians and Degree value of a circle using these built-in math functions are easy in T-SQL. Happy coding.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: