Skip to content

jitx/shapes/Arc

Package name: jitx/shapes/Arc

Summary

Arc

Arc

Constructors

Function Description
Arc Constructor for defstruct Arc

Functions

Function Description
Arc Create an arc, specifying the center with separate X and Y coordinate values instead of as a Point.
length Calculate the length of the arc.

Definitions

Arc

Arc

public defstruct Arc <: Shape & HasMetaUtils :
    angle: Double
    center: Point
    radius: Double
    start-angle: Double

  • angle: Double - Sweep angle of this arc in degrees counter-clockwise. A negative value indicates a clockwise sweep. Must be between -360.0 and 360.0 inclusive. A sweep angle of 0.0 indicates a single-point arc. A sweep angle of exactly -360.0 or 360.0 indicates a full circle.

  • center: Point - Center point of this arc.

  • radius: Double - Radius of this arc. Must be non-negative. If the radius is 0.0 then the actual shape is considered to be a point at the center of this arc.

  • start-angle: Double - Starting angle of this arc in degrees counter-clockwise from the positive X axis. Must be non-negative and strictly less than 360.0.

A circular arc specified by its center point, radius, starting angle, and sweep angle.

Constructors

Arc

Constructor for defstruct Arc

public defn Arc (center:Point, radius:Double, start-angle:Double, angle:Double)

Functions

Arc

Create an arc, specifying the center with separate X and Y coordinate values instead of as a Point.

public defn Arc (x:Double, y:Double, radius:Double, start-angle:Double, angle:Double) -> Arc

  • x: Double - X coordinate of the center of the arc.
  • y: Double - Y coordinate of the center of the arc.
  • start-angle: Double - Starting angle of the arc in degrees counter-clockwise from the positive X axis.
  • angle: Double - Counter-clockwise sweep angle of the arc.
  • Returns Arc

length

Calculate the length of the arc.

public defn length (a:Arc) -> Double

  • a: Arc - The arc to calculate the length of.
  • Returns Double

Related Packages

Forwarded by packages: jitx/shapes, jitx