Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37753 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6477 invoked from network); 20 May 2008 18:47:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 May 2008 18:47:30 -0000 Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.152 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 72.14.220.152 fg-out-1718.google.com Received: from [72.14.220.152] ([72.14.220.152:58320] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6A/42-28995-1CC13384 for ; Tue, 20 May 2008 14:47:29 -0400 Received: by fg-out-1718.google.com with SMTP id 16so2436531fgg.23 for ; Tue, 20 May 2008 11:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=fooSvtd22XXrI3WyOuhhFABdwkh/WNMHNn2bI7HFQhY=; b=vB5zX1LuS9mXbdNYq644C4gXz2jIPuto0PM3Xu/3EzPGfAEvfXFOuuNvJ4qVq5jxVaFfHHbJOMvoRITJ73yQIGF1cjlLC2OTJJVm6DbkwoDtjhZK8yD7WplcdnjtIBOw2+5epSjhXlh5r+CWkXBNbSSxvTpRvqxikfuEtHDne6E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sQGYRrVkbEzWmxlGis5/r+W5zqtIW5OhuXOKnehMPWVV9wED4lxoKwTlxXhGUEruP28FD4k2GWhywQBBMH+gBtE5j891Dkk5GfG5J25ndP+/XQJsoDRTvncAF3eZEyen33cL4R7ZLyus4jmugjuPUQZJvkB07rIqN954bk7puY4= Received: by 10.78.100.2 with SMTP id x2mr2550503hub.52.1211309245670; Tue, 20 May 2008 11:47:25 -0700 (PDT) Received: by 10.78.182.18 with HTTP; Tue, 20 May 2008 11:47:25 -0700 (PDT) Message-ID: Date: Tue, 20 May 2008 15:47:25 -0300 To: "Kalle Sommer Nielsen" Cc: "PHP Developers Mailing List" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: [PHP-DEV] Add deg2grad() and grad2deg() in PHP5.3 From: guilhermeblanco@gmail.com ("Guilherme Blanco") 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