import { Vector } from './vector' ; import { IEllipse } from '../../interfaces' ; /**
 * Creates a ellipse vector
 */ export class Ellipse extends Vector < Ellipse , IEllipse > { param point param radius constructor ( point , radius ) { super ( 'ellipse' ) ; this . setPoint ( point ) ; this . setRadius ( radius ) ; } param point private setPoint ( point ) { if ( Array . isArray ( point ) ) { this . content . x = point [ 0 ] ; this . content . y = point [ 1 ] ; } else { this . content . x = point ; this . content . y = point ; } } param radius private setRadius ( radius ) { if ( Array . isArray ( radius ) ) { this . content . r1 = radius [ 0 ] ; this . content . r2 = radius [ 1 ] ; } else { this . content . r1 = radius ; this . content . r2 = radius ; } } }