Trigonometric Functions
HelixQL provides a comprehensive set of trigonometric functions for angular calculations, including standard trigonometric functions (sine, cosine, tangent) and their inverse counterparts, essential for geospatial calculations, physics simulations, and angular measurements.Available Functions
SIN - Sine
COS - Cosine
TAN - Tangent
ASIN - Arcsine
ACOS - Arccosine
ATAN - Arctangent
ATAN2 - Two-Argument Arctangent
Example 1: Geospatial bearing calculations
Calculate the bearing (direction) between geographic coordinates:Example 2: Angle calculations with ATAN2
Use ATAN2 to calculate angles between vectors and points:Example 3: Inverse trigonometric functions
Use inverse trigonometric functions to recover angles from ratios:Radians vs Degrees
All trigonometric functions in HelixQL work with radians. To convert between degrees and radians:Domain Restrictions
Inverse trigonometric functions have domain restrictions:
- ASIN(x), ACOS(x): x must be in [-1, 1]
- ATAN(x): accepts all real numbers
- ATAN2(y, x): accepts all real numbers for both arguments
ATAN2 vs ATAN
ATAN2 is preferred over ATAN for angle calculations because:- It handles all four quadrants correctly
- It avoids division by zero when x = 0
- It returns values in the full range [-π, π]
Use in Geospatial Calculations
Trigonometric functions are essential for geospatial calculations:Related Topics
Unary Math Functions
SQRT, ABS, LN, LOG10, EXP, CEIL, FLOOR, ROUND
Constants
PI and E constants
Arithmetic Functions
ADD, SUB, MUL, DIV, POW, MOD
Math Overview
Overview of all math functions