Skip to content

Commit

Permalink
fix: correctly export hilbertTransform as xHilbertTransform
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Nov 8, 2022
1 parent 3c6b2d2 commit e0a80ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/x/__tests__/xHilbertTransform.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { hilbertTransform } from '../xHilbertTransform';
import { xHilbertTransform } from '../xHilbertTransform';

describe('test hilbert transform of cos(t)', () => {
const length = 50;
Expand All @@ -9,7 +9,7 @@ describe('test hilbert transform of cos(t)', () => {
const sin = new Array(length)
.fill(0)
.map((_, i) => Math.sin((i * Math.PI) / 10));
const trs = hilbertTransform(cos);
const trs = xHilbertTransform(cos);
const result = Array.from(trs);
// Excluding some points due to the edge effects
for (let i = 5; i < 45; i++) {
Expand All @@ -24,7 +24,7 @@ describe('test hilbert transform of cos(t)', () => {
const sin = new Array(length)
.fill(0)
.map((_, i) => Math.sin((i * Math.PI) / 10));
const trs = hilbertTransform(sin);
const trs = xHilbertTransform(sin);
const result = Array.from(trs);
// Excluding some points due to the edge effects
for (let i = 15; i < 35; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/x/xHilbertTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @returns A new vector with 90 degree shift regarding the phase of the original function
*/

export function hilbertTransform(
export function xHilbertTransform(
input: number[],
options: { inClockwise?: boolean } = {},
) {
Expand Down

0 comments on commit e0a80ef

Please sign in to comment.