Skip to content

Commit

Permalink
Expand no-simple-type-checking-assertions regex, see: phetsims/mean-s…
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed Oct 19, 2022
1 parent d1da282 commit 82cc108
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions js/segments/Arc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -872,10 +872,10 @@ export default class Arc extends Segment {
* @returns - Any overlaps (from 0 to 2)
*/
public static getAngularOverlaps( startAngle1: number, endAngle1: number, startAngle2: number, endAngle2: number ): Overlap[] {
assert && assert( typeof startAngle1 === 'number' && isFinite( startAngle1 ) );
assert && assert( typeof endAngle1 === 'number' && isFinite( endAngle1 ) );
assert && assert( typeof startAngle2 === 'number' && isFinite( startAngle2 ) );
assert && assert( typeof endAngle2 === 'number' && isFinite( endAngle2 ) );
assert && assert( isFinite( startAngle1 ) );
assert && assert( isFinite( endAngle1 ) );
assert && assert( isFinite( startAngle2 ) );
assert && assert( isFinite( endAngle2 ) );

// Remap start of arc 1 to 0, and the end to be positive (sign1 )
let end1 = endAngle1 - startAngle1;
Expand Down Expand Up @@ -924,8 +924,8 @@ export default class Arc extends Segment {
* @param radius2 - Radius of the second circle
*/
public static getCircleIntersectionPoint( center1: Vector2, radius1: number, center2: Vector2, radius2: number ): Vector2[] {
assert && assert( typeof radius1 === 'number' && isFinite( radius1 ) && radius1 >= 0 );
assert && assert( typeof radius2 === 'number' && isFinite( radius2 ) && radius2 >= 0 );
assert && assert( isFinite( radius1 ) && radius1 >= 0 );
assert && assert( isFinite( radius2 ) && radius2 >= 0 );

const delta = center2.minus( center1 );
const d = delta.magnitude;
Expand Down
4 changes: 2 additions & 2 deletions js/util/Overlap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export default class Overlap {
* - All of those t values are in the range [0,1]
*/
public constructor( a: number, b: number ) {
assert && assert( typeof a === 'number' && isFinite( a ) && a !== 0,
assert && assert( isFinite( a ) && a !== 0,
'a should be a finite non-zero number' );
assert && assert( typeof b === 'number' && isFinite( b ),
assert && assert( isFinite( b ),
'b should be a finite number' );

this.a = a;
Expand Down

0 comments on commit 82cc108

Please sign in to comment.