import { Angle } from './angle' ; import { Arc , Sector } from './arc' ; import { Circle } from './circle' ; import { Ellipse } from './ellipse' ; import { Line , Ray , Segment } from './line' ; import { Point } from './point' ; import { Polygon , Polyline } from './polygon' ; import { Rectangle } from './rectangle' ; import { GeoElement } from './utilities' ; export function isPolygonLike ( shape ) { return [ 'polygon' , 'polyline' , 'rectangle' , 'triangle' ] . includes ( shape . type ) ; } export function isPolygon ( shape ) { return [ 'polygon' , 'triangle' ] . includes ( shape . type ) ; } export function isPolyline ( shape ) { return shape . type === 'polyline' ; } export function isRectangle ( shape ) { return shape . type === 'rectangle' ; } export function isLineLike ( shape ) { return [ 'line' , 'ray' , 'segment' ] . includes ( shape . type ) ; } export function isLine ( shape ) { return shape . type === 'line' ; } export function isRay ( shape ) { return shape . type === 'ray' ; } export function isSegment ( shape ) { return shape . type === 'segment' ; } export function isCircle ( shape ) { return shape . type === 'circle' ; } export function isEllipse ( shape ) { return shape . type === 'ellipse' ; } export function isArc ( shape ) { return shape . type === 'arc' ; } export function isSector ( shape ) { return shape . type === 'sector' ; } export function isAngle ( shape ) { return shape . type === 'angle' ; } export function isPoint ( shape ) { return shape . type === 'point' ; }