-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converting dot Utils usage, see phetsims/dot#4
- Loading branch information
1 parent
0a69292
commit a1ea4d5
Showing
5 changed files
with
53 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,11 @@ | |
* @author Jonathan Olson <[email protected]> | ||
*/ | ||
|
||
import Utils from '../../../dot/js/Utils.js'; | ||
import Vector2 from '../../../dot/js/Vector2.js'; | ||
import merge from '../../../phet-core/js/merge.js'; | ||
import Segment, { Line, Arc } from '../segments/Segment.js'; | ||
import kite from '../kite.js'; | ||
|
||
// constants | ||
const lineLineIntersection = Utils.lineLineIntersection; | ||
import { lineLineIntersection } from '../../../dot/js/util/lineLineIntersection.js'; | ||
|
||
const DEFAULT_OPTIONS = { | ||
lineWidth: 1, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,9 @@ | |
* @author Jonathan Olson <[email protected]> | ||
*/ | ||
|
||
import Utils from '../../../dot/js/Utils.js'; | ||
import Vector2 from '../../../dot/js/Vector2.js'; | ||
import kite from '../kite.js'; | ||
import { clamp } from '../../../dot/js/util/clamp.js'; | ||
|
||
export default class RayIntersection { | ||
|
||
|
@@ -37,7 +37,7 @@ export default class RayIntersection { | |
this.normal = normal; | ||
this.distance = distance; | ||
this.wind = wind; | ||
this.t = Utils.clamp( t, 0, 1 ); // In case it is slightly out of range | ||
this.t = clamp( t, 0, 1 ); // In case it is slightly out of range | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* @author Jonathan Olson <[email protected]> | ||
*/ | ||
|
||
import Utils from '../../../dot/js/Utils.js'; | ||
import { clamp } from '../../../dot/js/util/clamp.js'; | ||
import Vector2 from '../../../dot/js/Vector2.js'; | ||
import kite from '../kite.js'; | ||
|
||
|
@@ -28,8 +28,8 @@ export default class SegmentIntersection { | |
this.point = point; | ||
|
||
// Clamped in case it's slightly out-of-range | ||
this.aT = Utils.clamp( aT, 0, 1 ); | ||
this.bT = Utils.clamp( bT, 0, 1 ); | ||
this.aT = clamp( aT, 0, 1 ); | ||
this.bT = clamp( bT, 0, 1 ); | ||
} | ||
|
||
/** | ||
|