In SQLite, the sin() function returns the sine of a value in radians.
Syntax #
sin(x)
Arguments #
x
x is a number, an expression, or a table column that you want to calculate the sine.
Return Type #
real
The function returns the sine of x in radians. If x is NULL, the function returns NULL.
If x is a string, the sin() function will convert it into a number before calculating the sine. If the conversion fails, the sin() function returns NULL.
Examples #
The following example uses the sin() function to calculate the sine of zero (0):
SELECT sin(0) result;
Output:
result
------
0.0
The following statement uses the sin() function to return the sine of pi/2:
SELECT sin(pi()/2) result;
Output:
result
------
1.0
Thank you for your feedback!