Sin() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns the sine of a number. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

Sin( num_expr ) 

num_expr is a numeric expression representing an angle in radians.

Return Value

Float

Description

The Sin() function returns the sine of the numeric num_expr value, which represents an angle in radians. The result returned from Sin() will be between one and negative one. To convert a degree value to radians, multiply that value by DEG_2_RAD. To convert a radian value into degrees, multiply that value by RAD_2_DEG. The codes DEG_2_RAD and RAD_2_DEG are defined in MAPBASIC.DEF.

Example

Include "mapbasic.def" 
Dim x, y As Float 
x = 30 * DEG_2_RAD 
y = Sin(x) 
' y will now be equal to 0.5 
' since the sine of 30 degrees is 0.5 

See Also:

Acos() function, Asin() function, Atn() function, Cos() function, Tan() function