Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37754 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9650 invoked from network); 20 May 2008 19:11:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 May 2008 19:11:37 -0000 Authentication-Results: pb1.pair.com header.from=kalle@zesix.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=kalle@zesix.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zesix.com from 67.19.4.138 cause and error) X-PHP-List-Original-Sender: kalle@zesix.com X-Host-Fingerprint: 67.19.4.138 8a.4.1343.static.theplanet.com Received: from [67.19.4.138] ([67.19.4.138:45066] helo=web.clantemplates.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1D/C2-28995-76223384 for ; Tue, 20 May 2008 15:11:36 -0400 Received: from [81.216.205.138] (helo=KALLESAWESOMEPC) by web.clantemplates.com with esmtpa (Exim 4.63) (envelope-from ) id 1JyXFB-0005Mz-U6; Tue, 20 May 2008 12:11:07 -0700 Message-ID: <4D0F5827906C42F69F16798598186754@KALLESAWESOMEPC> To: "Guilherme Blanco" Cc: "PHP Developers Mailing List" References: In-Reply-To: Date: Tue, 20 May 2008 21:11:25 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18000 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - web.clantemplates.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - zesix.com Subject: Re: [PHP-DEV] Add deg2grad() and grad2deg() in PHP5.3 From: kalle@zesix.com ("Kalle Sommer Nielsen") Ah Cheers I didn't think of number optimizations, but its done now Cheers Kalle ----- Original Message ----- From: "Guilherme Blanco" To: "Kalle Sommer Nielsen" Cc: "PHP Developers Mailing List" Sent: Tuesday, May 20, 2008 8:47 PM Subject: Re: [PHP-DEV] Add deg2grad() and grad2deg() in PHP5.3 > Hi... > > Are there any explanation why you used 360 and 400 and not optimized > it? I know 1 full circle = 360 deg = 400 grads, but you can simplify > it to: > > RETURN_DOUBLE((9 / 10) * deg); > > and... > > RETURN_DOUBLE((10 / 9) * grads); > > > Regards, > > On Tue, May 20, 2008 at 3:22 PM, Kalle Sommer Nielsen > wrote: >> Greetings internals >> >> I've made two functions that allows convertion between degress and >> gradians, >> below is a pastebin >> of the functions as that would look in math.c: >> http://www.phpfi.com/318450 >> >> If no objections against it I will commit them in PHP_5_3 and HEAD and I >> will prepare some test >> cases for those aswell. >> >> >> Cheers >> Kalle >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > > -- > Guilherme Blanco - Web Developer > CBC - Certified Bindows Consultant > Cell Phone: +55 (16) 9166-6902 > MSN: guilhermeblanco@hotmail.com > URL: http://blog.bisna.com > Rio de Janeiro - RJ/Brazil > > > > > -- > No virus found in this incoming message. > Checked by AVG. > Version: 7.5.524 / Virus Database: 269.23.21/1455 - Release Date: > 19-05-2008 17:04 > >