Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
2 | 2 | 1 | 0.976 | ExpressionStatement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 2 | 145 | Closure/closure/goog/math/coordinate.js |
2 | 2 | 227 | Closure/closure/goog/math/vec2.js |
| ||||
/** * Returns the sum of two coordinates as a new goog.math.Coordinate. * @param {goog.math.Coordinate} a A Coordinate. * @param {goog.math.Coordinate} b A Coordinate. * @return {goog.math.Coordinate} A Coordinate representing the sum of the two * coordinates. */ goog.math.Coordinate.sum= function (a, b){ return new goog.math.Coordinate(a.x+ b.x, a.y+ b.y); } ; |
| ||||
/** * Returns the sum of two vectors as a new Vec2. * @param {!goog.math.Vec2} a The first vector. * @param {!goog.math.Vec2} b The second vector. * @return {!goog.math.Vec2} The sum vector. */ goog.math.Vec2.sum= function (a, b){ return new goog.math.Vec2(a.x+ b.x, a.y+ b.y); } ; |
| |||
/** * Returns the sum of two coordinates as a new goog.math.Coordinate. * @param {goog.math.Coordinate} a A Coordinate. * @param {goog.math.Coordinate} b A Coordinate. * @return {goog.math.Coordinate} A Coordinate representing the sum of the two * coordinates. */ /** * Returns the sum of two vectors as a new Vec2. * @param {!goog.math.Vec2} a The first vector. * @param {!goog.math.Vec2} b The second vector. * @return {!goog.math.Vec2} The sum vector. */ goog.math. [[#variable6311d540]].sum= function (a,b) { return new goog.math. [[#variable6311d540]](a.x+b.x,a.y+b.y); } ; |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6311d540]] | Coordinate |
1 | 2 | [[#6311d540]] | Vec2 |