-
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.
Merge pull request #185 from VisActor/feat/add-some-utils
Feat/add some utils
- Loading branch information
Showing
15 changed files
with
221 additions
and
65 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
common/changes/@visactor/vdataset/feat-add-some-utils_2024-05-15-10-04.json
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"comment": "feat: add some utils, `isDataView`, `normalizeAngle`, .etc\n\n", | ||
"type": "none", | ||
"packageName": "@visactor/vdataset" | ||
} | ||
], | ||
"packageName": "@visactor/vdataset", | ||
"email": "dingling112@gmail.com" | ||
} |
11 changes: 11 additions & 0 deletions
11
common/changes/@visactor/vutils/feat-add-some-utils_2024-05-15-10-04.json
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"comment": "feat: add some utils, `isDataView`, `normalizeAngle`, .etc\n\n", | ||
"type": "none", | ||
"packageName": "@visactor/vutils" | ||
} | ||
], | ||
"packageName": "@visactor/vutils", | ||
"email": "dingling112@gmail.com" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { isDataView, DataView, DataSet } from '../src'; | ||
|
||
describe('Dataview', () => { | ||
it('isDataView', () => { | ||
const dt = new DataSet(); | ||
|
||
expect(isDataView(new DataView(dt))).toBeTruthy(); | ||
expect(isDataView({})).toBeFalsy(); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { normalizeAngle } from '../src'; | ||
|
||
describe('angle utils', () => { | ||
it('normalizeAngle', () => { | ||
expect(normalizeAngle(0)).toBe(0); | ||
expect(normalizeAngle(Math.PI)).toBe(Math.PI); | ||
expect(normalizeAngle(2 * Math.PI)).toBe(0); | ||
expect(normalizeAngle(6.28)).toBe(6.28); | ||
expect(normalizeAngle(3 * Math.PI)).toBe(Math.PI); | ||
expect(normalizeAngle(4 * Math.PI)).toBe(0); | ||
expect(normalizeAngle(-2 * Math.PI)).toBe(0); | ||
expect(normalizeAngle(-Math.PI)).toBe(Math.PI); | ||
}); | ||
}); |
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
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './blas1'; | ||
export * from './nelder-mead'; | ||
export * from './conjugate-gradient'; | ||
export * from './bisect'; |
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