Skip to the content

Suido水道

Turn pipes to connect the pumps and drains, through fixed levels or seeded puzzles.

Suido means water supply in Japanese. About the name

Contents

Reference · Pipes, rules and solving

percentileInfunction

Where value stands among sorted quantiles, 0 to 1: how far through them it is, by the share of the way between neighbours.

Import it

import { percentileIn } from "@johnmorrisdotca/suido";

Definition

function percentileIn(quantiles: readonly number[], value: number): number

Parameters

NameTypeDescription
quantilesreadonly number[]

Ordered reference quantiles.

valuenumber

The measurement to rank among the quantiles.

Returns

number

Where value stands among sorted quantiles, 0 to 1: how far through them it is, by the share of the way between neighbours.

Examples

import { percentileIn } from "@johnmorrisdotca/suido";

console.log(percentileIn([0,10,20],15));
0.75

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/suido 1.7.0.