Skip to content

Commit

Permalink
refactor(src-files): refactor to comply with object-shorthand eslint …
Browse files Browse the repository at this point in the history
…rule
  • Loading branch information
FlorentinTh committed Feb 2, 2022
1 parent 92ac519 commit 5ebc5a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/features/Feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Feature {

async deviation(options = { signal: null }) {
const signal = options.signal === null ? this.signal : options.signal;
const average = await this.average({ signal: signal });
const average = await this.average({ signal });

return new Promise(resolve => {
let sum = 0;
Expand Down Expand Up @@ -212,7 +212,7 @@ class Feature {
async entropy() {
let sum = 0;
const fft = new FFTReal(this.signal);
const energy = await this.energy({ fft: fft });
const energy = await this.energy({ fft });

for (let i = 0; i < fft.length; ++i) {
sum += (Math.pow(fft[i].re, 2) + Math.pow(fft[i].im, 2)) / (fft.length - energy);
Expand Down

0 comments on commit 5ebc5a5

Please sign in to comment.