lundi 11 juillet 2016

How is a Swift CGVector created with dx and dy (derivative)?


I'm trying to understand how a Vector is created in Swift, because when I do CGVectorMake(), tells me to pass a dx and dy (derivative) as a CGFloat. How can I create a Vector (line) with only that information?

Can anyone explain me ? Like for dummies? I searched in Google but I still couldn't find an easy explanation.

Let's say I would like to create a Vector that goes from point (0,0) to point (5,5).


Aucun commentaire:

Enregistrer un commentaire