O'Reilly logo

VBScript in a Nutshell, 2nd Edition by Ron Petrusha, Matt Childs, Paul Lomax

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Sin Function

Syntax

Sin(number)
number

Use: Required

Data Type: Numeric

An angle expressed in radians.

Return Value

A Double containing the sine of an angle.

Description

Returns the ratio of two sides of a right triangle in the range -1 to 1.

Rules at a Glance

The ratio is determined by dividing the length of the side opposite the angle by the length of the hypotenuse.

Programming Tips and Gotchas

  • You can convert radians to degrees using the formula:

    radians = degrees * (pi/180)
  • You can convert degrees to radians using the formula:

    degrees = radians * (180/pi)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required