Description: |
| |
| The Sin function (pronounced "Sine Function") is a function that takes an argument of a numeric data type that represents an angle and returns the argument's trigonometric Sine value. |
|
Syntax: |
| |
| The following shows the format of the Sin Function syntax. |
| |
|
|
| |
| The following table lists the elements of the Sin Function syntax. |
| |
| Element | Description |
| {expression} | Any valid numeric expression that expresses an angle. |
|
|
Operation: |
| |
| When a Sin function is encountered during the program's execution, it takes the {expression} element which is expressed in an Binary Radians, calculates and then returns the trigonometric ratio of two sides of a right triangle. The calculated ratio is the length of the side opposite the angle divided by the length of the hypotenuse. |
|
Remarks: |
| |
| Sine is defined as the ration created by dividing the length of the side opposite the angle (Y) by the length of the hypotenuse (H) in a right triangle. The Sin function returns a numeric data type. The result of the Sin function is the value represented by the number which divided by 255 forms the ratio equivilent to the angle being represented. In other words, a result of 45 from a Sin call represents the angle 45/255. This is how the ooPIC gets around the integer math limitation. The oConverter Object also provides this function. |
|
Example: |
| |
| In this example, the variable A is assigned to the Sine value for 90. |
|
|
|
Related Items:
|
| | Cos function, oConverter Object, URCP Heading Value. |
Version History and Bug List: |
| | Firmware Ver A1: Introduced. Bugs: No known bugs. |