PI()

PI()

Returns Pi, the perimeter-to-diameter-ratio of a circle

Syntax

      PI() -> nPi

Returns

<nPi> the math constant Pi with maximum precision available

Description

The function PI() can be used if the constant Pi is needed with maximum precision. One of the most known interpretations of this number is the constant perimeter-to-diameter-ratio of circles.

Examples

      // the diameter of a circle-like swimming pool is 3.4 meters, how
      // long is the perimeter ?

      ? Str( PI() * 3.4, 5, 3 ) + " meters" // --> 10.681 meters

Compliance

PI() is compatible with CT3’s PI().

Platforms

All

Files

Source is trig.c, library is libct.

Seealso

SIN(), COS(), TAN(), COT(), ASIN(), ACOS(), ATAN(), ATN2(), SINH(), COSH(), TANH(), RTOD(), DTOR()

2 responses to “PI()

  1. Pingback: Harbour All Functions – P | Viva Clipper !

  2. Pingback: Harbour Math Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.