• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dead Reckoning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dead Reckoning


  • Subject: Re: Dead Reckoning
  • From: Rick Mann <email@hidden>
  • Date: Fri, 09 Oct 2015 21:21:34 -0700

> On Oct 9, 2015, at 21:13 , Graham Cox <email@hidden> wrote:
>
>
>> On 10 Oct 2015, at 1:58 am, Michael de Haan  <email@hidden> wrote:
>>
>> func degrees2radians(coordinate:CLLocationDegrees) -> Double {
>>
>>  return (M_PI * coordinate ) / 180.00
>> }
>>
>> func radians2degrees(coordinate:CLLocationDegrees) -> Double {
>>
>>  return (180.00 * coordinate ) / M_PI
>> }
>>
>
> JFYI:
>
> It might be worth noting that for performance crtical code, these two functions can be replaced by simple multiply-by-a-constant macros:
>
>
> #define	DEGREES_TO_RADIANS( d )			((d) * 0.0174532925199432958)
> #define 	RADIANS_TO_DEGREES( r )			((r) * 57.29577951308232)

The compiler should figure that out either way it's written.

--
Rick Mann
email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Dead Reckoning
      • From: Graham Cox <email@hidden>
References: 
 >Dead Reckoning (From: Michael de Haan  <email@hidden>)
 >Re: Dead Reckoning (From: Michael de Haan  <email@hidden>)
 >Re: Dead Reckoning (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Dead Reckoning
  • Next by Date: Re: Dead Reckoning
  • Previous by thread: Re: Dead Reckoning
  • Next by thread: Re: Dead Reckoning
  • Index(es):
    • Date
    • Thread