Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "circle"

Index

Interfaces

Constructor Functions

Other Functions

Transform Functions

Constructor Functions

from

  • from(x: number, y: number, radius: number): Circle
  • Creates a circle given the x, y coordinates of the center and its radius.

    Parameters

    • x: number
    • y: number
    • radius: number

    Returns Circle

Other Functions

area

  • area(circle: Circle): number
  • Calculates the area of circle.

    Parameters

    Returns number

center

  • Gets the Point at the center of circle.

    Parameters

    Returns Point

clone

  • Creates a copy of circle that can be modified separately.

    Parameters

    Returns Circle

contains

  • Determines whether circle contains point.

    Parameters

    Returns boolean

diameter

  • diameter(circle: Circle): number
  • Calculates the diameter of circle.

    Parameters

    Returns number

equals

  • Determines whether c1 and c2 are equal.

    Circles are considered equal if their center coordinates and radii are the same.

    Parameters

    Returns boolean

intersects

  • Determines whether c1 and c2 intersect.

    Parameters

    Returns boolean

is

  • is(value: any): value is Circle
  • Determines whether value is a Circle.

    Parameters

    • value: any

    Returns value is Circle

Transform Functions

translate

  • Translates circle by vector.

    This modifies the circle. Use translated if you want to create a new circle.

    Parameters

    Returns void

translated

  • translated(circle: Circle, vector: Vector): { radius: number; x: number; y: number }
  • Translates a circle by a vector.

    This creates a new circle. Use translate if you want to modify the circle instead.

    Parameters

    Returns { radius: number; x: number; y: number }

    The translated circle

    • radius: number
    • x: number
    • y: number

Generated using TypeDoc