| Asin Function |
System.Math
Math.Asin( d )
A number representing a sine, which can range from -1 to 1
A Double between -pi/2 and pi/2 that is the arcsine of d in radians
Returns the arcsine of d , in radians
If d is out of range, the function returns NaN .
This is a Shared member, so it can be used without creating any objects.
To convert from radians to degrees, multiply by 180/pi.
The Asin function did not exist in VB 6.
Acos Function, Atan Function, Atan2 Function
| Atan Function |
System.Math
Math.Atan( d )
A number representing a tangent
A Double that is the arctangent in radians of d , in the range -pi/2 to pi/2
Takes the ratio of two sides of a right triangle (
d
) and returns the corresponding angle in radians. The ratio is the length of the side
If d is out of range, the function returns NaN .
This is a Shared member, so it can be used without creating any objects.
Private Sub Main( )
Dim dblSideAdj As Double
Dim dblSideOpp As Double
Dim dblRatio As Double
Dim dblAtangent As Double
dblSideAdj = 50.25
dblSideOpp = 75.5
dblRatio = dblSideOpp / dblSideAdj
dblAtangent = Math.Atan(dblRatio)
'convert from radians to degrees
dblDegrees = dblAtangent * (180 / 3.142)
MsgBox dblDegrees & " Degrees"
End Sub
To convert radians to degrees, multiply radians by 180/pi.
Do not confuse Atan with the cotangent. Atan is the inverse trigonometric function of Tan , whereas the cotangent is the reciprocal of the tangent.
The Atan function corresponds to the VB 6 Atn intrinsic function.
Acos Function, Asin Function, Atan2 Function
| Atan2 Function |
System.Math
Math.Atan2( y , x )
The x coordinate of a point
The y coordinate of a point
A Double that is the arctangent of the ratio x/y, in radians
Returns the angle in the Cartesian plane
For (x, y) in quadrant 1, 0 < q < pi/2.
For (x, y) in quadrant 2, pi /2 < q < pi.
For ( x, y) in quadrant 3, -pi < q < -pi /2.
For ( x, y) in quadrant 4, -pi /2 < q < 0.
This is a Shared member, so it can be used without creating any objects.
The Atan2 function does not exist in VB 6.
Acos Function, Asin Function, Atan Function
| AttributeUsage Attribute |
System.AttributeUsageAttribute
Class
Defines the program elements to which a custom attribute can be applied. Its use is required when defining a custom attribute.
New( validOn )
Indicates the program elements to which a custom attribute can be applied. Possible values are All , Assembly , Class , Constructor , Delegate , Enum , Event , Field , Interface , Struct , Method , Module , Parameter , Property , and ReturnValue .
Indicates whether the attribute can be used more than once on a single program element. Its default value is False .
Indicates whether attribute is automatically inherited by derived classes and overridden
Read-only. Indicates the program elements to which the attribute can be applied. Its value is set by the required validon parameter of the class constructor.
See Section 8.2 in Chapter 8 for more details and an example.