azimuthUnitVector(in:)
Returns a unit vector that points in the direction of the azimuth of the stylus.
Declaration
func azimuthUnitVector(in view: UIView?) -> CGVectorParameters
- view:
The view that contains the stylus’s touch. Pass
nilto get the unit vector for the azimuth that is relative to the touch’s window.
Return Value
The unit vector that points in the direction of the azimuth of the stylus.
Discussion
It is less expensive to get the azimuth unit vector than the azimuth angle. If you’re creating transform matrices, the unit vector can also be more useful.