@method clone()
@for kity.BezierPoint
@description 返回贝塞尔点的一份拷贝

@grammar clone() => {kity.BezierPoint}
347107
function() {
                var newPoint = new BezierPoint(), tmp = null;
                tmp = this.getVertex();
                newPoint.setVertex(tmp.x, tmp.y);
                tmp = this.getForward();
                newPoint.setForward(tmp.x, tmp.y);
                tmp = this.getBackward();
                newPoint.setBackward(tmp.x, tmp.y);
                newPoint.setSymReflaction(this.isSymReflaction);
                newPoint.setSmooth(this.isSmooth());
                return newPoint;
            }
33109
def _makes_clone(_func, *args, **kw):
    
    self = args[0]._clone()
    _func(self, *args[1:], **kw)
    return self
808482
public static Point3d[] clonePoint3dArray(Point3d[] x) {
		Point3d[] clone = new Point3d[x.length];
		for (int i = 0; i < x.length; i++) {
			clone[i] = new Point3d(x[i]);
		}
		return clone;
	}
424992
function clone(obj) {
  var key;
  var copy = {};
  for (key in obj) {
    /* istanbul ignore else */
    if (hop.call(obj, key)) {
      copy[key] = obj[key];
    }
  }
  return copy;
}
850728
function( obj1, obj2 ) {
            var newObj = {};
            if ( obj1 ) {
                this.inheritAttrs( newObj, this.cloneObj( obj1 ) );
            }
            if ( obj2 ) {
                this.inheritAttrs( newObj, obj2 );
            }
            return newObj;
        }
447498
private QueryTreeNode cloneTrunk(QueryTreeNode stop, QueryTreeNode stopClone) {
		QueryTreeNode node1 = null;
		if (n1 != null) {
			node1 = (n1 == stop ? stopClone : n1.cloneBranch());
		}
		QueryTreeNode node2 = null;
		if (n2 != null) {
			node2 = n2 == stop ? stopClone : n2.cloneBranch();
		}
		
		QueryTreeNode ret = cloneSingle(node1, t1, node2, t2);
		if (p != null) {
			p.cloneTrunk(this, ret);
		}
		ret.relateToChildren();
		return ret;
	}
82800
function clone(obj1, obj2, index) {
  index = index || 0;
  for (var i in obj2) {
    if ('object' == typeof i) obj1[i] = recursiveMerge(obj1[i], obj2[i], index++);
    else obj1[i] = obj2[i];
  }
  return obj1;
}
918866
def clone(self):
        
        clone = copy.copy(self)
        clone._unused = clone._unused.clone()
        return clone
462211
public Polygon copy() {
		float[] copyPoints = new float[points.length];
		System.arraycopy(points, 0, copyPoints, 0, copyPoints.length);
		
		return new Polygon(copyPoints);
	}
1350044
function cloneArray(a) {
    var b = [], i = a.length
    while (i--) b[ i ] = a[ i ]
    return b
}
1264107
private Grammar cloneGrammarIntoNewResourceSet(final Grammar original) {
    final Resource originalResource = original.eResource();
    XtextResourceSet _xtextResourceSet = new XtextResourceSet();
    final XtextResourceSet clonedResourceSet = EcoreUtil2.<XtextResourceSet>clone(_xtextResourceSet, originalResource.getResourceSet());
    final Resource clonedResource = clonedResourceSet.getResource(originalResource.getURI(), false);
    EObject _head = IterableExtensions.<EObject>head(clonedResource.getContents());
    return ((Grammar) _head);
  }
1268668
function(px) {
        var newPx = this.clone();
        if (px) {
            newPx = this.add(px.x, px.y);
        }
        return newPx;
    }
645680
function clone(source) {
            if (!source || typeof source !== 'object') {
                return source;
            }

            var cloned = source;

            if (isArray(source)) {
                cloned = source.slice().map(clone);
            }
            else if (isObject(source) && 'isPrototypeOf' in source) {
                cloned = {};
                for (var key in source) {
                    if (hasOwnProperty.call(source, key)) {
                        cloned[key] = clone(source[key]);
                    }
                }
            }

            return cloned;
        }
1025950
function clone(arr) {
              	var newArr = [];
              	for (var i=0; i<arr.length; i++) {
              		newArr.push(arr[i]);
              	}
              	return newArr;
              }
1061844
function checkOverlapping ( bezierPoint, distance ) {

        var forward = bezierPoint.getForward(),
            backward = bezierPoint.getBackward(),
            vertex = bezierPoint.getVertex();

        if ( Vector.fromPoints( forward, vertex ).length() <= distance ) {

            // forward重叠
            return 1;

        } else if ( Vector.fromPoints( backward, vertex ).length() <= distance ) {

            // backward重叠
            return 2;

        }

        // 无重叠
        return 0;

    }
42458
function copy() {
  const nodes = [];
  const cnodes = [];
  const mapping = {};
  this.each((node) => {
    nodes.push(node);
    const cnode = new Node(node.id, node.data);
    cnodes.push(cnode);
    mapping[cnode.id] = cnode;
  });

  cnodes.forEach((cnode, i) => {
    const node = nodes[i];
    cnode.children = node.children.map((c) => mapping[c.id]);
  });

  if (this.id === undefined) {
    const root = new Node(undefined, undefined);
    root.children = this.children.map((c) => mapping[c.id]);
  } else {
    return mapping[this.id];
  }
}
1360930
function clone(source) {
    return source != null ? JSON.parse(JSON.stringify(source)) : source;
}