Metal Example Code-- Objects Example -- where is vector_normalize() ?

I just upgraded to Xcode 9 and the Metal example code "AdoptingMetalIIDesigningandImplementingaReal-WorldMetalRenderer" has stopped working. The "ObjectsExample" project fails to build with its chief complaint being such things as: Utils.swift:29:22: Use of unresolved identifier 'vector_normalize'


My Swift and my Metal skills are shaky, but I do know how to normalize a vector. however I'd rather have a working version from the horse's mouth so I can focus on learning Swift & Metal from Apple experts, rather than from experience in debugging someone else's code.

Accepted Reply

Never mind!

I looked at the changes for "simd" in OSX 10.12 and found that

replacing vector_normalize with normalize made things work.

Replies

Never mind!

I looked at the changes for "simd" in OSX 10.12 and found that

replacing vector_normalize with normalize made things work.