Class: DefMidPoint

algeobra~DefMidPoint()

Definition for a midpoint. Points are their own midpoint. Arcs and ellipses have their center as a midpoint For a collection of points, their mean value is the midpoint

Constructor

new DefMidPoint()

Source:

Methods

compute(createInfo) → {Object}

Computes the midpoint
Parameters:
Name Type Description
createInfo CreateInfo The creation info
Source:
Returns:
An object of TYPE_POINT
Type
Object

(static) fromObject(obj) → {CreateInfo}

Computes the midpoint of an object
Parameters:
Name Type Description
obj Number | Object Either the index or value of one of [TYPE_POINT, TYPE_LINE, TYPE_ARC, TYPE_ELLIPSE] or an array of TYPE_POINT
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromPoints(…obj) → {CreateInfo}

Computes the midpoint of a number of points
Parameters:
Name Type Attributes Description
obj Number | Object <repeatable>
Either the index or value of objects of TYPE_POINT
Source:
Returns:
The creation info
Type
CreateInfo