Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pi(3) [php man page]

PI(3)									 1								     PI(3)

pi - Get value of pi

SYNOPSIS
float pi (void ) DESCRIPTION
Returns an approximation of pi. The returned float has a precision based on the precision directive in php.ini, which defaults to 14. Also, you can use the M_PI constant which yields identical results to pi(3). RETURN VALUES
The value of pi as float. EXAMPLES
Example #1 pi(3) example <?php echo pi(); // 3.1415926535898 echo M_PI; // 3.1415926535898 ?> PHP Documentation Group PI(3)

Check Out this Related Man Page

CAIRO_ARC(3)								 1							      CAIRO_ARC(3)

CairoContext::arc - Adds a circular arc

       Object oriented style (method):

SYNOPSIS
public void CairoContext::arc (float $x, float $y, float $radius, float $angle1, float $angle2) DESCRIPTION
Procedural style: void cairo_arc (CairoContext $context, float $x, float $y, float $radius, float $angle1, float $angle2) Adds a circular arc of the given radius to the current path. The arc is centered at ($x, $y), begins at $angle1 and proceeds in the direc- tion of increasing angles to end at $angle2. If $angle2 is less than $angle1 it will be progressively increased by 2*M_PI until it is greater than $angle1. If there is a current point, an initial line segment will be added to the path to connect the current point to the beginning of the arc. If this initial line is undesired, it can be avoided by calling CairoContext::newSubPath or procedural cairo_new_sub_path(3) before calling CairoContext::arc or cairo_arc(3). Angles are measured in radians. An angle of 0.0 is in the direction of the positive X axis (in user space). An angle of M_PI/2.0 radians (90 degrees) is in the direction of the positive Y axis (in user space). Angles increase in the direction from the positive X axis toward the positive Y axis. So with the default transformation matrix, angles increase in a clockwise direction. (To convert from degrees to radians, use degrees * (M_PI / 180.).) This function gives the arc in the direction of increasing angles; see CairoContext::arcNegative or cairo_arc_negative(3) to get the arc in the direction of decreasing angles. PARAMETERS
o $context - A valid CairoContext object o $x - x position o $y - y position o $radius - Radius of the arc o $angle1 - start angle o $angle2 - end angle RETURN VALUES
No value is returned. EXAMPLES
Example #1 Object oriented style <?php $s = new CairoImageSurface(CairoFormat::ARGB32, 100, 100); $c = new CairoContext($s); $c->setSourceRgb(0, 0, 0); $c->paint(); $c->setLineWidth(1); $c->setSourceRgb(1, 1, 1); for ($r = 50; $r > 0; $r -= 10) { $c->arc(50, 50, $r, 0, 2 * M_PI); $c->stroke(); $c->fill(); } $s->writeToPng(dirname(__FILE__) . '/CairoContext__arc.png'); ?> Example #2 Procedural style <?php $s = cairo_image_surface_create(CAIRO_SURFACE_TYPE_IMAGE, 100, 100); $c = cairo_create($s); cairo_set_source_rgb($c, 0, 0, 0); cairo_paint($c); cairo_set_source_rgb($c, 1, 1, 1); cairo_set_line_width($c, 1); for ($r = 50; $r > 0; $r -= 10) { cairo_arc($c, 50, 50, $r, 0, 2 * M_PI); cairo_stroke($c); cairo_fill($c); } cairo_surface_write_to_png($s, dirname(__FILE__) . '/cairo_arc.png'); ?> SEE ALSO
CairoContext::arcNegative. PHP Documentation Group CAIRO_ARC(3)
Man Page

12 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

picture

How i do i post a picture below my name as some of u have???? Is there a rule like only those who are moderators, administrators only can have a picture below their names??? If not, then kindly tell me how to post a picture below my name?? Thanks, Nisha :rolleyes: (44 Replies)
Discussion started by: Nisha
44 Replies

2. Shell Programming and Scripting

Help with script, shutdown if no ping responce

Hi, i would like to create a script that shuts down the system if the power fails, basicly the solaris box would load the script at startup. Ping 192.168.1.100 every 20 secs If cannot get responce 3 times in a row send init 0 to the system. Simple but effective, as 192.168.100.1 wont be on... (39 Replies)
Discussion started by: ringofsteel
39 Replies

3. Shell Programming and Scripting

Swapping or switching 2 lines using sed

I made a script that can swap info on two lines using a combination of awk and sed, but was hoping to consolidate the script to make it run faster. If found this script, but can't seem to get it to work in a bash shell. I keep getting the error "Too many {'s". Any help here would be appreciated:... (38 Replies)
Discussion started by: LaTortuga
38 Replies

4. What is on Your Mind?

How Many Computers Do You Have At Home?

Here is an easy one. Count the number of desktops and servers you have running at home, including your home office if you have one. Don't count those that are in storage or you rarely use, count the ones that are powered on most, if not all, of the day (and night). (86 Replies)
Discussion started by: Neo
86 Replies

5. UNIX for Dummies Questions & Answers

Timekeeping in Linux question ...

Hi again! I'm still learning with unixacademy dvds and I have a question related to a timekeeping. Again I'm new to Linux and UNIX and most of my computing experince is Windows. I researched this on google but couldn't find a clear answer. I've been tweeking time zones in my last excersize... ... (31 Replies)
Discussion started by: newlinuxuser1
31 Replies

6. UNIX for Dummies Questions & Answers

How to pick only the latest files based on the timestamp?

I have a few log files which get generated on a daily basis..So, I need to pick only the ones which get generated for that particular day. -rw-r--r-- 1 staff 510732676 Apr 7 22:01 test.log040711 -rwxrwxrwx 1 staff 2147482545 Apr 7 21:30 test.log.2 -rwxrwxrwx 1 staff 2147482581 Apr 7 19:26... (43 Replies)
Discussion started by: win4luv
43 Replies

7. Programming

Incompatiblity of the code due to CC compiler version mismatch.

Incompatiblity of the code due to CC compiler version mismatch. I have a machine with Machine A-- Operating System:SunOs 5.8 Generic_117350-45 sun4u sparc SUNW,Ultra-80(solaris 5.8) CC Compiler:CC: WorkShop Compilers 4.2 16 Jun 1998 C++ 4.2 patch 104631-07 we have compiled C++... (36 Replies)
Discussion started by: Revathi R
36 Replies

8. SuSE

Post Your /proc/cpuinfo here!

Here is a chance for Linux users to easily compare Linux CPU info and some meaningless BOGOMIPS. Everyone who is running Linux is welcome to: cat /proc/cpuinfo and post the results. Here is the results for www.unix.com: processor : 0 vendor_id : AuthenticAMD cpu family... (182 Replies)
Discussion started by: Neo
182 Replies

9. Shell Programming and Scripting

Grepping a timestamp range and assigning it to a constant

Hi, I couldn't find any thing on google about it and have been trying to figure this out but am not getting anywhere. I want to know if its possible through a script. I have a file with columns start time and end time separated by a comma, basically there are some other columns which I need to... (30 Replies)
Discussion started by: dsid
30 Replies

10. What is on Your Mind?

Prototyping New Responsive Mobile UNIX.COM

I'm working on updates to the mobile phone view, and it's going to look much better I think. Here are some current prototypes: Prototype Mobile Home Page: https://www.unix.com/members/1-albums214-picture690.jpg Prototype Mobile Search Page: ... (43 Replies)
Discussion started by: Neo
43 Replies

11. What is on Your Mind?

Prototyping New Responsive Mobile for UNIX.COM - Phase II

Have completed "Phase I" of our project "Prototyping New Responsive Mobile UNIX.COM", I am now moving to "Phase II" which will be changing many of the menus and buttons to use Javascript and CSS for the mobile site menus. For example, here is the new "main side menu" for the mobile site (below).... (63 Replies)
Discussion started by: Neo
63 Replies

12. Open Source

What is your favorite Linux distro?

What is your favorite Linux distro? and possibly why? Personally, I have Fedora 3 on my computer. I have used Ubuntu and Slackware, too. But I think I liked Ubuntu more, maybe because of its speed and easy installation of packages. (192 Replies)
Discussion started by: milhan
192 Replies