On this page

Function convert

  • Construct a point from an array if necessary, otherwise if the input is already a Point, return it unchanged.

    Parameters

    • p: Point | [number, number] | { x: number; y: number }

      input value

    Returns Point

    constructed point.

    // this
    var point = Point.convert([0, 1]);
    // is equivalent to
    var point = new Point(0, 1);
    
Was this helpful?
SDK JS
Reference
convert