Files
ValueScript/inputs/passing/helpers/randish.ts
Andrew Morris 53695d7948 More benchmarks
2023-06-21 16:17:52 +10:00

13 lines
246 B
TypeScript

export default function* randish() {
let x = 0.123;
while (true) {
x -= (x * x + 1) / (2 * x + 0.1);
x -= (x * x + 1) / (2 * x + 0.1);
x -= (x * x + 1) / (2 * x + 0.1);
const y = 1000 * x;
yield y - Math.floor(y);
}
}