Skip to content

Commit 15579d7

Browse files
committed
Fixed jsdocs
1 parent 968dc05 commit 15579d7

1 file changed

Lines changed: 22 additions & 16 deletions

File tree

src/geom/triangle/CircumCenter.js

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@
44
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
55
*/
66

7+
var Vector2 = require('../../math/Vector2');
8+
79
// Adapted from http://bjornharrtell.github.io/jsts/doc/api/jsts_geom_Triangle.js.html
810

911
/**
10-
* Computes the determinant of a 2x2 matrix. Uses standard double-precision
11-
* arithmetic, so is susceptible to round-off error.
12+
* Computes the determinant of a 2x2 matrix. Uses standard double-precision arithmetic, so is susceptible to round-off error.
13+
*
14+
* @function det
15+
* @private
16+
* @since 3.0.0
1217
*
13-
* @param {Number}
14-
* m00 the [0,0] entry of the matrix.
15-
* @param {Number}
16-
* m01 the [0,1] entry of the matrix.
17-
* @param {Number}
18-
* m10 the [1,0] entry of the matrix.
19-
* @param {Number}
20-
* m11 the [1,1] entry of the matrix.
21-
* @return {Number} the determinant.
18+
* @param {number} m00 - The [0,0] entry of the matrix.
19+
* @param {number} m01 - The [0,1] entry of the matrix.
20+
* @param {number} m10 - The [1,0] entry of the matrix.
21+
* @param {number} m11 - The [1,1] entry of the matrix.
22+
*
23+
* @return {number} the determinant.
2224
*/
2325
function det (m00, m01, m10, m11)
2426
{
@@ -31,14 +33,18 @@ function det (m00, m01, m10, m11)
3133
* the common intersection point of the perpendicular bisectors of the sides of
3234
* the triangle, and is the only point which has equal distance to all three
3335
* vertices of the triangle.
34-
* <p>
35-
* This method uses an algorithm due to J.R.Shewchuk which uses normalization to
36-
* the origin to improve the accuracy of computation. (See <i>Lecture Notes on
37-
* Geometric Robustness</i>, Jonathan Richard Shewchuk, 1999).
36+
*
37+
* @function Phaser.Geom.Triangle.CircumCenter
38+
* @since 3.0.0
39+
*
40+
* @param {Phaser.Geom.Triangle} triangle - [description]
41+
* @param {Phaser.Math.Vector2} [out] - [description]
42+
*
43+
* @return {Phaser.Math.Vector2} [description]
3844
*/
3945
var CircumCenter = function (triangle, out)
4046
{
41-
if (out === undefined) { out = { x: 0, y: 0 }; }
47+
if (out === undefined) { out = new Vector2(); }
4248

4349
var cx = triangle.x3;
4450
var cy = triangle.y3;

0 commit comments

Comments
 (0)