SSRandomPointForSizeWithinRect(_:_:)
Returns a random point.
Declaration
func SSRandomPointForSizeWithinRect(_ size: NSSize, _ rect: NSRect) -> NSPointParameters
- size:
The horizontal and vertical amounts to subtract from the rectangle’s size.
- rect:
The rectangle to contain the point.
Return Value
A random point within rect, constrained within (rect.size - size) from rect’s origin.
Discussion
The Screen Saver framework automatically seeds the random() C function to generate the point.