Thank you for all your input.
I made one small little change to accept time input in seconds.
>>
let secondsToHours = 2.778E-4
..
let rDistance = ((speed * time * knotsToMeters * secondsToHours) / earthRadius)
<<
> On Oct 9, 2015, at 9:33 PM, Rick Mann wrote:
>
>
> On 10 Oct 2015, at 3:54 pm, Jens Alfke wrote:
>
> There’s very little reason to use macros for things like this, when an inline
> function is as efficient and safer.
>
Probably another example of modern technology passing me by - used these macros
for >20 years… ;)
Here’s a quick test I
The code is in Swift. #define is not an option.
> There’s very little reason to use macros for things like this, when an inline
> function is as efficient and safer.
IMHO function calls also help readability. My version looks like this:
private let π = M_PI
private let d2r = π / 180 // degree
> On Oct 9, 2015, at 9:24 PM, Graham Cox wrote:
>
> Does it actually replace a function call with an inline constant multiply?
Sure. With optimizations enabled, the compiler is likely to inline the function
calls, which will turn them into a simple multiplication. (This applies to any
of C, O
I found this:
http://lists.apple.com/archives/cocoa-dev/2009/May/msg00437.html
I'm still having problems that after editing the tokens and pressing enter,
it isn't committed back to the object. Just wondering if this is a known
bug?
___
Cocoa-dev mailin
> On Oct 9, 2015, at 21:24 , Graham Cox wrote:
>
>
>> On 10 Oct 2015, at 3:21 pm, Rick Mann wrote:
>>
>> The compiler should figure that out either way it's written.
>
>
> Does it actually replace a function call with an inline constant multiply?
And it wouldn't be function calls, but inst
> On Oct 9, 2015, at 21:24 , Graham Cox wrote:
>
>
>> On 10 Oct 2015, at 3:21 pm, Rick Mann wrote:
>>
>> The compiler should figure that out either way it's written.
>
>
> Does it actually replace a function call with an inline constant multiply?
Yeah, it should. Probably even with optimiz
> On 10 Oct 2015, at 3:21 pm, Rick Mann wrote:
>
> The compiler should figure that out either way it's written.
Does it actually replace a function call with an inline constant multiply?
—Graham
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.
> On Oct 9, 2015, at 21:13 , Graham Cox wrote:
>
>
>> On 10 Oct 2015, at 1:58 am, Michael de Haan wrote:
>>
>> func degrees2radians(coordinate:CLLocationDegrees) -> Double {
>>
>> return (M_PI * coordinate ) / 180.00
>> }
>>
>> func radians2degrees(coordinate:CLLocationDegrees) -> Double
> On 10 Oct 2015, at 1:58 am, Michael de Haan wrote:
>
> func degrees2radians(coordinate:CLLocationDegrees) -> Double {
>
> return (M_PI * coordinate ) / 180.00
> }
>
> func radians2degrees(coordinate:CLLocationDegrees) -> Double {
>
> return (180.00 * coordinate ) / M_PI
> }
>
JFYI:
> On Oct 9, 2015, at 7:41 AM, Jacek Oleksy wrote:
>
> HI All,
> I am creating custom toolbar and placing some buttons in it. I want it
> to look as close to native toolbar as possible (and no, sadly I cannot
> use NSToolbar).
Are you subclassing NSToolbar? NSToolbarItem has a view property that
>
> I am trying to derive a DR fix from an initialized CLLocation.
>
> Like this. (Playground)
>
> let fixTime = NSDate(timeInterval: (1.00 * 60.00 * 60.00 * -1.00),
> sinceDate: NSDate()) // one hour ago
> let fixLocation = CLLocation(coordinate:
> CLLocationCoordinate2DMake(boatLocation.co
HI All,
I am creating custom toolbar and placing some buttons in it. I want it
to look as close to native toolbar as possible (and no, sadly I cannot
use NSToolbar).
The problem is that when I put NSButton on the custom toolbar with
NSTexturedRoundedBezelStyle, its height is 22 pixels. However, if
Gerriet,
In IB, I have a separate view controller for my detail view. I then created a
segue from the my table view to the detail view controller and I assigned it
the ID “showDetails” and changed the segue type to “Show Details (replace)". In
code, I trigger my segue here:
func tableView(tab
14 matches
Mail list logo