This repository has been archived by the owner on May 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(speed-slider): Use two linear functions for better speed sliding
- Loading branch information
1 parent
69cd82e
commit c37ef85
Showing
10 changed files
with
122 additions
and
25 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
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 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,31 @@ | ||
import test from 'ava' | ||
import { toPercent, roundUp, round } from './math' | ||
|
||
test('exports a method called toPercent', t => { | ||
t.is(typeof toPercent, 'function') | ||
}) | ||
|
||
test('exports a method called roundUp', t => { | ||
t.is(typeof roundUp, 'function') | ||
}) | ||
|
||
test('exports a method called round', t => { | ||
t.is(typeof round, 'function') | ||
}) | ||
|
||
test(`toPrecent: transforms absolute value to percentage`, t => { | ||
t.is(toPercent(), 0) | ||
t.is(toPercent(1.5), 150) | ||
}) | ||
|
||
test(`round: rounds to floats with 2 nachkomma`, t => { | ||
t.is(round(), 0.00) | ||
t.is(round(1), 1.00) | ||
t.is(round(1.33777777), 1.34) | ||
}) | ||
|
||
test(`roundUp: rounds to next full float quantile`, t => { | ||
t.is(roundUp(5)(1), 1.05) | ||
t.is(roundUp(5)(1.05), 1.10) | ||
t.is(roundUp(5)(1.06), 1.10) | ||
}) |