Skip to content

Commit

Permalink
mathjax doc change test
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Jan 13, 2025
1 parent b7bb853 commit 172d105
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions js/Vector2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ export default class Vector2 implements TPoolable {

/**
* The angle $\theta$ of this vector, such that this vector is equal to
* $$ u = \begin{bmatrix} r\cos\theta \\ r\sin\theta \end{bmatrix} $$
* $$
* u = \begin{bmatrix} r\cos\theta \\ r\sin\theta \end{bmatrix}
* $$
* for the magnitude $r \ge 0$ of the vector, with $\theta\in(-\pi,\pi]$
*/
public getAngle(): number {
Expand Down Expand Up @@ -181,7 +183,9 @@ export default class Vector2 implements TPoolable {

/**
* The scalar value of the z-component of the equivalent 3-dimensional cross product:
* $$ f( u, v ) = \left( \begin{bmatrix} u_x \\ u_y \\ 0 \end{bmatrix} \times \begin{bmatrix} v_x \\ v_y \\ 0 \end{bmatrix} \right)_z = u_x v_y - u_y v_x $$
* $$
* f( u, v ) = \left( \begin{bmatrix} u_x \\ u_y \\ 0 \end{bmatrix} \times \begin{bmatrix} v_x \\ v_y \\ 0 \end{bmatrix} \right)_z = u_x v_y - u_y v_x
* $$
*/
public crossScalar( v: Vector2 ): number {
return this.x * v.y - this.y * v.x;
Expand Down Expand Up @@ -687,7 +691,9 @@ export default class Vector2 implements TPoolable {

/**
* Returns a Vector2 with the specified magnitude $r$ and angle $\theta$ (in radians), with the formula:
* $$ f( r, \theta ) = \begin{bmatrix} r\cos\theta \\ r\sin\theta \end{bmatrix} $$
* $$
* f( r, \theta ) = \begin{bmatrix} r\cos\theta \\ r\sin\theta \end{bmatrix}
* $$
*/
public static createPolar( magnitude: number, angle: number ): Vector2 {
return new Vector2( 0, 0 ).setPolar( magnitude, angle );
Expand Down

0 comments on commit 172d105

Please sign in to comment.