mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -05:00
parent
932f8cc5eb
commit
a2de76e94e
2 changed files with 12 additions and 1 deletions
|
|
@ -11,6 +11,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
</script>
|
||||
|
||||
<InputBox>
|
||||
<label>
|
||||
<input
|
||||
type="radio"
|
||||
bind:group={range}
|
||||
value={PercentageRangeEnum.Percentile50}
|
||||
/>
|
||||
50%
|
||||
</label>
|
||||
<label>
|
||||
<input
|
||||
type="radio"
|
||||
|
|
|
|||
|
|
@ -7,12 +7,15 @@ export enum PercentageRangeEnum {
|
|||
All = 0,
|
||||
Percentile100 = 1,
|
||||
Percentile95 = 2,
|
||||
Percentile50 = 3,
|
||||
}
|
||||
|
||||
export function PercentageRangeToQuantile(range: PercentageRangeEnum) {
|
||||
// These are halved because the quantiles are in both directions
|
||||
return ({
|
||||
[PercentageRangeEnum.Percentile100]: 1,
|
||||
[PercentageRangeEnum.Percentile95]: 0.975, // this is halved because the quantiles are in both directions
|
||||
[PercentageRangeEnum.Percentile95]: 0.975,
|
||||
[PercentageRangeEnum.Percentile50]: 0.75,
|
||||
[PercentageRangeEnum.All]: undefined,
|
||||
})[range];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue