Siebel VB Language Reference > VB Language Reference >
This standard VB function returns the angle (in radians) for the arctangent of the specified number.
Any valid numeric expression
The arctangent of number.
The Atn function assumes number is the ratio of two sides of a right triangle: the side opposite the angle to find and the side adjacent to the angle. The function returns a single-precision value for a ratio expressed as an integer, a currency, or a single-precision numeric expression. The return value is a double-precision value for a long, variant, or double-precision numeric expression.
To convert radians to degrees, multiply by (180/PI). The value of PI is approximately 3.14159.
This example finds the roof angle necessary for a house with an attic ceiling of 8 feet (at the roof peak) and a 16-foot span from the outside wall to the center of the house. The Atn function returns the angle in radians; it is multiplied by 180/PI to convert it to degrees.
Dim height As Single, span As Single, angle As Single
Dim PI As Single
PI = 3.14159
height = 8
span = 16
angle = Atn(height/span) * (180/PI)
Derived Trigonometric Functions for Siebel VB