Erratta2

func +( left: Vector, right: Vector) -> Vector {
return left.vectorByAddingVector( right)
}

func *( left: Vector, right: Double) -> Vector {
return Vector( x: left.x * right , y: left.y * right)
}

Hillegass, Aaron; Preble, Adam; Chandler, Nate (2015-04-16). Cocoa Programming for OS X: The Big Nerd Ranch Guide (5th Edition) (Big Nerd Ranch Guides) (Kindle Locations 1736-1737). Pearson Education. Kindle Edition.

Should be (space between the operator and the open parens:
func + ( left: Vector, right: Vector) -> Vector {
return left.vectorByAddingVector( right)
}

func * ( left: Vector, right: Double) -> Vector {
return Vector( x: left.x * right , y: left.y * right)
}

Actually… that doesn’t seem to be working either… I’m getting an error "Consecutive declarations on a line must be separated by ‘;’

Figured it out… had to move the Operator overload functions outside of the Vector class… Sorry bout the false errata claim

Glad you got it sorted out!

May I suggest you add a brief note to this effect in your text next time the book is printed? I, too, initially tripped over this problem.

mark915 wrote:
Figured it out… had to move the Operator overload functions outside of the Vector class… Sorry bout the false errata claim

I got tripped by the same thing. Pls adjust for next version