capsule

fun capsule(length: Float, radius: Float, x: Float = 0.0f, y: Float = 0.0f, angle: Float = 0.0f): Shape(source)

Returns a pill length long between its two caps' centres, and radius round, centred on (x, y) and lying along x, turned by angle radians. End to end it is length + 2 · radius.

Throws

if length or radius is not finite and more than 0.