Ad
  • Custom User Avatar

    Nevermind... I feel silly. I don't think I ever changed the method parameters around any... But I included the underscores to allow for unnamed parameters and now everything works fine. Sorry!

  • Custom User Avatar

    I am still running into the same issue. When I run my sample tests with this:

    var result = race(v1: 720, v2: 850, g:70)
    if let printableResult = result {
    print(printableResult)
    }

    I get a reasonable result. However, when I attempt I get this:

    main.swift:14:23: error: missing argument labels 'v1:v2:g:' in call
    XCTAssert(race(v1, v2, g)! == expected!, "should return (expected!)")
    ^
    v1: v2: g:
    main.swift:17:27: error: missing argument labels 'v1:v2:g:' in call
    XCTAssertTrue(race(v1, v2, g) == nil, "Should return nil")
    ^
    v1: v2: g:

    I have no access to any of those test cases so there is no way I can change any of the calls to include argument labels.

  • Custom User Avatar

    Really? That's so strange. I'll try again at work today.

  • Custom User Avatar

    I believe the Swift test cases need updating. Seems to want named parameters inside of the testing framework.

  • Custom User Avatar

    Have a quick question for you folks. This was extremely easy once I knew of the n-planes formula, but I did not know it previous to looking at the discussion (was confused about 3 cuts being 7, ended up seeing the n-planes comment). How would you recommend learning and remembering vague algorithms like this one?