#!/usr/bin/env dub
/+ dub.sdl:
name "manim_rate_functions"
targetPath "build"
+/
/**
* Rate functions (easing) — the reshaping every `Animation` applies to its
* `[0,1]` time parameter before interpolation, plus the `lag_ratio`
* staggering that spreads a group of sub-animations across the window.
*
* The *animation & timing* axis of the analysis spine, exercised in code.
* A Manim `Animation` maps wall-clock progress `alpha ∈ [0,1]` through a
* `rate_func` and then lerps the mobject; composition (`AnimationGroup`,
* `LaggedStart`) additionally offsets each submobject by `lag_ratio` so they
* start in sequence. This probe reimplements the community rate functions and
* the `get_sub_alpha` stagger formula so the timing model is grounded in
* runnable numbers rather than prose:
*
* - `linear(t) = t`
* - `smootherstep(t) = 6t⁵ − 15t⁴ + 10t³` (zero 1st AND 2nd derivative at
* both ends). NOTE the fork divergence: this quintic is
* ManimGL's default `smooth` (rate_functions.py — "Equivalent
* to bezier([0,0,0,1,1,1])"), but Manim **community**'s default
* `smooth` is instead a normalized logistic **sigmoid**
* (`inflection = 10`), and it keeps the quintic under the
* separate name `smootherstep`. Both are ease-in-out S-curves;
* this probe prints both so the divergence is visible.
* - `smoothSigmoid(t)` — community's default `smooth`: a logistic sigmoid
* rescaled to hit exactly 0 and 1 at the endpoints.
* - `rush_into(t)= 2·smootherstep(t/2)` (ease-in only)
* - `rush_from(t)= 2·smootherstep(t/2 + ½) − 1` (ease-out only)
* - `there_and_back(t)` — out to 1 at t=½, back to 0 at t=1
* - the `lag_ratio` sub-window map:
* full = (n−1)·lag + 1; sub_alpha_i = alpha·full − i·lag
* (Manim clamps this to `[0,1]` one call deeper, inside the `unit_interval`
* decorator wrapping each rate function; this probe clamps it directly.)
*
* The eased tables and the stagger matrix here are the evidence behind
* `concepts.md` § easing / § lag_ratio and the `manim-community/index.md`
* timing section.
*
* Companion to docs/research/manim/concepts.md § "Rate function / easing"
* and § "lag_ratio / stagger".
* Run with: dub run --single rate-functions.d
*
* Portability: pure computation, no external dependencies — runs everywhere.
*/
module (module) manim_rate_functionsRate functions (easing) — the reshaping every Animation applies to its
[0,1] time parameter before interpolation, plus the lag_ratio
staggering that spreads a group of sub-animations across the window.
The animation & timing axis of the analysis spine, exercised in code.
A Manim Animation maps wall-clock progress alpha ∈ [0,1] through a
rate_func and then lerps the mobject; composition (AnimationGroup,
LaggedStart) additionally offsets each submobject by lag_ratio so they
start in sequence. This probe reimplements the community rate functions and
the get_sub_alpha stagger formula so the timing model is grounded in
runnable numbers rather than prose:
linear(t) = t
smootherstep(t) = 6t⁵ − 15t⁴ + 10t³ (zero 1st AND 2nd derivative at
both ends). NOTE the fork divergence: this quintic is
ManimGL's default smooth (rate_functions.py — "Equivalent
to bezier(0,0,0,1,1,1)"), but Manim community's default
smooth is instead a normalized logistic sigmoid
(inflection = 10), and it keeps the quintic under the
separate name smootherstep. Both are ease-in-out S-curves;
this probe prints both so the divergence is visible.
smoothSigmoid(t) — community's default smooth: a logistic sigmoid
rescaled to hit exactly 0 and 1 at the endpoints.
rush_into(t)= 2·smootherstep(t/2) (ease-in only)
rush_from(t)= 2·smootherstep(t/2 + ½) − 1 (ease-out only)
there_and_back(t) — out to 1 at t=½, back to 0 at t=1
the lag_ratio sub-window map:
full = (n−1)·lag + 1; sub_alpha_i = alpha·full − i·lag
(Manim clamps this to [0,1] one call deeper, inside the unit_interval
decorator wrapping each rate function; this probe clamps it directly.)
The eased tables and the stagger matrix here are the evidence behind
concepts.md § easing / § lag_ratio and the manim-community/index.md
timing section.
Companion to docs/research/manim/concepts.md § "Rate function / easing"
and § "lag_ratio / stagger".
Run with: dub run --single rate-functions.d
Portability
pure computation, no external dependencies — runs everywhere.
manim_rate_functions;
import (package) stdstd.(module) std.algorithmThis package implements generic algorithms oriented towards the processing of
sequences. Sequences processed by these functions define range-based
interfaces. See also Reference on ranges and
tutorial on ranges.
Algorithms are categorized into the following submodules:
Submodule Functions
| Searching |
all
any
balancedParens
boyerMooreFinder
canFind
commonPrefix
count
countUntil
endsWith
find
findAdjacent
findAmong
findSkip
findSplit
findSplitAfter
findSplitBefore
minCount
maxCount
minElement
maxElement
minIndex
maxIndex
minPos
maxPos
skipOver
startsWith
until
|
| Comparison |
among
castSwitch
clamp
cmp
either
equal
isPermutation
isSameLength
levenshteinDistance
levenshteinDistanceAndPath
max
min
mismatch
predSwitch
|
| Iteration |
cache
cacheBidirectional
chunkBy
cumulativeFold
each
filter
filterBidirectional
fold
group
joiner
map
mean
permutations
reduce
splitWhen
splitter
substitute
sum
uniq
|
| Sorting |
completeSort
isPartitioned
isSorted
isStrictlyMonotonic
ordered
strictlyOrdered
makeIndex
merge
multiSort
nextEvenPermutation
nextPermutation
nthPermutation
partialSort
partition
partition3
schwartzSort
sort
topN
topNCopy
topNIndex
|
| Set operations (setops) |
cartesianProduct
largestPartialIntersection
largestPartialIntersectionWeighted
multiwayMerge
multiwayUnion
setDifference
setIntersection
setSymmetricDifference
|
| Mutation |
bringToFront
copy
fill
initializeAll
move
moveAll
moveSome
moveEmplace
moveEmplaceAll
moveEmplaceSome
remove
reverse
strip
stripLeft
stripRight
swap
swapRanges
uninitializedFill
|
Many functions in this package are parameterized with a predicate.
The predicate may be any suitable callable type
(a function, a delegate, a functor, or a lambda), or a
compile-time string. The string may consist of any legal D
expression that uses the symbol a (for unary functions) or the
symbols a and b (for binary functions). These names will NOT
interfere with other homonym symbols in user code because they are
evaluated in a different context. The default for all binary
comparison predicates is "a == b" for unordered operations and
"a < b" for ordered operations.
Example
int[] a = ...;
static bool greater(int a, int b)
{
return a > b;
}
sort!greater(a); // predicate as alias
sort!((a, b) => a > b)(a); // predicate as a lambda.
sort!"a > b"(a); // predicate as string
// (no ambiguity with array name)
sort(a); // no predicate, "a < b" is implicit
Source
std/algorithm/package.d
algorithm : (alias template) manim_rate_functions.clamp = std.algorithm.comparison.clamp(T1, T2, T3)(T1 val, T2 lower, T3 upper)Clamps val into the given bounds. Result has the same type as val.
clamp;
import (package) stdstd.(module) std.mathContains the elementary mathematical functions (powers, roots,
and trigonometric functions), and low-level floating-point operations.
Mathematical special functions are available in std.mathspecial.
Category Members Constants E PI PI_2 PI4 M1_PI M2_PI M2_SQRTPI LN10 LN2 LOG2 LOG2E LOG2T LOG10E SQRT2 SQRT1_2 Algebraic abs fabs sqrt cbrt hypot poly nextPow2 truncPow2 Trigonometry sin cos tan asin acos atan atan2 sinh cosh tanh asinh acosh atanh Rounding ceil floor round lround trunc rint lrint nearbyint rndtol quantize Exponentiation & Logarithms pow powmod exp exp2 expm1 ldexp frexp log log2 log10 logb ilogb log1p scalbn Remainder fmod modf remainder remquo Floating-point operations approxEqual feqrel fdim fmax fmin fma isClose nextDown nextUp nextafter NaN getNaNPayload cmp Introspection isFinite isIdentical isInfinity isNaN isNormal isSubnormal signbit sgn copysign isPowerOf2 Hardware Control IeeeFlags ieeeFlags resetIeeeFlags FloatingPointControl
The functionality closely follows the IEEE754-2008 standard for
floating-point arithmetic, including the use of camelCase names rather
than C99-style lower case names. All of these functions behave correctly
when presented with an infinity or NaN.
The following IEEE 'real' formats are currently supported:
64 bit Big-endian 'double' (eg PowerPC)
128 bit Big-endian 'quadruple' (eg SPARC)
64 bit Little-endian 'double' (eg x86-SSE2)
80 bit Little-endian, with implied bit 'real80' (eg x87, Itanium)
128 bit Little-endian 'quadruple' (not implemented on any known processor!)
Non-IEEE 128 bit Big-endian 'doubledouble' (eg PowerPC) has partial support
Unlike C, there is no global 'errno' variable. Consequently, almost all of
these functions are pure nothrow.
Source
std/math/package.d
math : (alias) manim_rate_functions.exp = real std.math.exponential.exp(real x) pure nothrow @nogc @trustedCalculates ex.
x ex + + - +0.0
exp;
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) manim_rate_functions.write = std.stdio.write(T...)(T args) if (!is(T[0] : File))Writes its arguments in text format to standard output (without a trailing newline).
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
write("Input ", count, ": ", line, "\n");
}
}
write, (alias template) manim_rate_functions.writefln = std.stdio.writefln(alias fmt, A...)(A args) if (isSomeString!(typeof(fmt)))Equivalent to writef(fmt, args, '\n').
writefln, (alias template) manim_rate_functions.writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln;
/// The smootherstep quintic — ManimGL's default `smooth`, community's `smootherstep`.
double double manim_rate_functions.smootherstep(double t) pure nothrow @nogc @safeThe smootherstep quintic — ManimGL's default smooth, community's smootherstep.
smootherstep(double (parameter) double tt) @safe pure nothrow @nogc
{
// 6t^5 - 15t^4 + 10t^3
return (parameter) double tt * (parameter) double tt * (parameter) double tt * ((parameter) double tt * ((parameter) double tt * 6 - 15) + 10);
}
/// Community's default `smooth`: a logistic sigmoid rescaled to [0,1] on [0,1].
double double manim_rate_functions.smoothSigmoid(double t, double inflection = 10.0) pure nothrow @nogc @safesmoothSigmoid(double (parameter) double tt, double (parameter) double inflectioninflection = 10.0) @safe pure nothrow @nogc
{
double double manim_rate_functions.smoothSigmoid.sig(double x) pure nothrow @nogc @safesig(double (parameter) double xx) => 1.0 / (1.0 + double std.math.exponential.exp(double x) pure nothrow @nogc @safeCalculates ex.
x ex + + - +0.0
exp(-(parameter) double xx));
const (local variable) const(double) errerr = double manim_rate_functions.smoothSigmoid.sig(double x) pure nothrow @nogc @safesig(-(parameter) double inflectioninflection * 0.5); // value at t=0, subtracted off
return double std.algorithm.comparison.clamp!(double, double, double)(double val, double lower, double upper) pure nothrow @nogc @safeClamps val into the given bounds. Result has the same type as val.
Examples
assert(clamp(2, 1, 3) == 2);
assert(clamp(0, 1, 3) == 1);
assert(clamp(4, 1, 3) == 3);
assert(clamp(1, 1, 1) == 1);
assert(clamp(5, -1, 2u) == 2);
auto x = clamp(42, uint.max, uint.max);
static assert(is(typeof(x) == int));
assert(x == -1);
clamp((double manim_rate_functions.smoothSigmoid.sig(double x) pure nothrow @nogc @safesig((parameter) double inflectioninflection * ((parameter) double tt - 0.5)) - (local variable) const(double) errerr) / (1 - 2 * (local variable) const(double) errerr), 0.0, 1.0);
}
double double manim_rate_functions.linear(double t) pure nothrow @nogc @safelinear(double (parameter) double tt) @safe pure nothrow @nogc => (parameter) double tt;
double double manim_rate_functions.rushInto(double t) pure nothrow @nogc @saferushInto(double (parameter) double tt) @safe pure nothrow @nogc => 2 * double manim_rate_functions.smootherstep(double t) pure nothrow @nogc @safeThe smootherstep quintic — ManimGL's default smooth, community's smootherstep.
smootherstep((parameter) double tt / 2);
double double manim_rate_functions.rushFrom(double t) pure nothrow @nogc @saferushFrom(double (parameter) double tt) @safe pure nothrow @nogc => 2 * double manim_rate_functions.smootherstep(double t) pure nothrow @nogc @safeThe smootherstep quintic — ManimGL's default smooth, community's smootherstep.
smootherstep((parameter) double tt / 2 + 0.5) - 1;
double double manim_rate_functions.thereAndBack(double t) pure nothrow @nogc @safethereAndBack(double (parameter) double tt) @safe pure nothrow @nogc
=> (parameter) double tt < 0.5 ? double manim_rate_functions.smootherstep(double t) pure nothrow @nogc @safeThe smootherstep quintic — ManimGL's default smooth, community's smootherstep.
smootherstep(2 * (parameter) double tt) : double manim_rate_functions.smootherstep(double t) pure nothrow @nogc @safeThe smootherstep quintic — ManimGL's default smooth, community's smootherstep.
smootherstep(2 * (1 - (parameter) double tt));
/// Manim's `get_sub_alpha`: submobject `i` of `n` under a given `lag_ratio`.
double double manim_rate_functions.subAlpha(double alpha, ulong i, ulong n, double lag) pure nothrow @nogc @safeManim's get_sub_alpha: submobject i of n under a given lag_ratio.
subAlpha(double (parameter) double alphaalpha, (alias) object.size_t = ulongsize_t (parameter) ulong ii, (alias) object.size_t = ulongsize_t (parameter) ulong nn, double (parameter) double laglag) @safe pure nothrow @nogc
{
const (local variable) const(double) fullfull = ((parameter) ulong nn - 1) * (parameter) double laglag + 1;
return double std.algorithm.comparison.clamp!(double, double, double)(double val, double lower, double upper) pure nothrow @nogc @safeClamps val into the given bounds. Result has the same type as val.
Examples
assert(clamp(2, 1, 3) == 2);
assert(clamp(0, 1, 3) == 1);
assert(clamp(4, 1, 3) == 3);
assert(clamp(1, 1, 1) == 1);
assert(clamp(5, -1, 2u) == 2);
auto x = clamp(42, uint.max, uint.max);
static assert(is(typeof(x) == int));
assert(x == -1);
clamp((parameter) double alphaalpha * (local variable) const(double) fullfull - (parameter) ulong ii * (parameter) double laglag, 0.0, 1.0);
}
int int D main() @safemain() @safe
{
alias (alias) manim_rate_functions.main.Fn = double function(double) pure nothrow @nogc @safeFn = double function(double) @safe pure nothrow @nogc;
const (alias) manim_rate_functions.main.Fn = double function(double) pure nothrow @nogc @safeFn[5] (local variable) const(double function(double) pure nothrow @nogc @safe[5]) fnsfns = [&double manim_rate_functions.linear(double t) pure nothrow @nogc @safelinear, &double manim_rate_functions.smootherstep(double t) pure nothrow @nogc @safeThe smootherstep quintic — ManimGL's default smooth, community's smootherstep.
smootherstep, &double manim_rate_functions.rushInto(double t) pure nothrow @nogc @saferushInto, &double manim_rate_functions.rushFrom(double t) pure nothrow @nogc @saferushFrom, &double manim_rate_functions.thereAndBack(double t) pure nothrow @nogc @safethereAndBack];
immutable (alias) object.string = stringstring[5] (local variable) immutable(string[5]) namesnames = ["linear", "smoother", "rushInto", "rushFrom", "there&back"];
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("== rate functions over t in [0, 1] ==");
void std.stdio.writefln!(char, string, string, string, string, string)(in char[] fmt, string __param_1, string __param_2, string __param_3, string __param_4, string __param_5) @safeEquivalent to writef(fmt, args, '\n').
writefln(" t %-9s %-9s %-9s %-9s %-9s", (local variable) immutable(string[5]) namesnames[0], (local variable) immutable(string[5]) namesnames[1], (local variable) immutable(string[5]) namesnames[2], (local variable) immutable(string[5]) namesnames[3], (local variable) immutable(string[5]) namesnames[4]);
foreach ((local variable) int ii; 0 .. 11)
{
const (local variable) const(double) tt = (local variable) int ii / 10.0;
void std.stdio.writefln!(char, const(double), double, double, double, double, double)(in char[] fmt, const(double) __param_1, double __param_2, double __param_3, double __param_4, double __param_5, double __param_6) @safeEquivalent to writef(fmt, args, '\n').
writefln(" %4.1f %8.4f %8.4f %8.4f %8.4f %8.4f",
(local variable) const(double) tt, (local variable) const(double function(double) pure nothrow @nogc @safe[5]) fnsfns[0]((local variable) const(double) tt), (local variable) const(double function(double) pure nothrow @nogc @safe[5]) fnsfns[1]((local variable) const(double) tt), (local variable) const(double function(double) pure nothrow @nogc @safe[5]) fnsfns[2]((local variable) const(double) tt), (local variable) const(double function(double) pure nothrow @nogc @safe[5]) fnsfns[3]((local variable) const(double) tt), (local variable) const(double function(double) pure nothrow @nogc @safe[5]) fnsfns[4]((local variable) const(double) tt));
}
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("\n== fork divergence: ManimGL/community `smootherstep` vs community default `smooth` (sigmoid) ==");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" t smootherstep smooth (sigmoid) |Δ|");
foreach ((local variable) int ii; 0 .. 11)
{
const (local variable) const(double) tt = (local variable) int ii / 10.0;
const (local variable) const(double) aa = double manim_rate_functions.smootherstep(double t) pure nothrow @nogc @safeThe smootherstep quintic — ManimGL's default smooth, community's smootherstep.
smootherstep((local variable) const(double) tt), (local variable) const(double) bb = double manim_rate_functions.smoothSigmoid(double t, double inflection = 10.0) pure nothrow @nogc @safesmoothSigmoid((local variable) const(double) tt);
void std.stdio.writefln!(char, const(double), const(double), const(double), const(double))(in char[] fmt, const(double) __param_1, const(double) __param_2, const(double) __param_3, const(double) __param_4) @safeEquivalent to writef(fmt, args, '\n').
writefln(" %4.1f %8.4f %8.4f %6.4f", (local variable) const(double) tt, (local variable) const(double) aa, (local variable) const(double) bb, (local variable) const(double) aa > (local variable) const(double) bb ? (local variable) const(double) aa - (local variable) const(double) bb : (local variable) const(double) bb - (local variable) const(double) aa);
}
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("\n== smootherstep(t) as an ASCII curve (x = t, height = eased value) ==");
foreach_reverse ((local variable) int rowrow; 0 .. 11)
{
const (local variable) const(double) levellevel = (local variable) int rowrow / 10.0;
void std.stdio.write!string(string __param_0) @safeWrites its arguments in text format to standard output (without a trailing newline).
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
write("Input ", count, ": ", line, "\n");
}
}
write(" ");
foreach ((local variable) int colcol; 0 .. 41)
{
const (local variable) const(double) tt = (local variable) int colcol / 40.0;
void std.stdio.write!char(char __param_0) @safeWrites its arguments in text format to standard output (without a trailing newline).
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
write("Input ", count, ": ", line, "\n");
}
}
write(double manim_rate_functions.smootherstep(double t) pure nothrow @nogc @safeThe smootherstep quintic — ManimGL's default smooth, community's smootherstep.
smootherstep((local variable) const(double) tt) >= (local variable) const(double) levellevel - 0.05 && double manim_rate_functions.smootherstep(double t) pure nothrow @nogc @safeThe smootherstep quintic — ManimGL's default smooth, community's smootherstep.
smootherstep((local variable) const(double) tt) <= (local variable) const(double) levellevel + 0.05 ? '*' : ' ');
}
void std.stdio.writefln!(char, const(double))(in char[] fmt, const(double) __param_1) @safeEquivalent to writef(fmt, args, '\n').
writefln(" %.1f", (local variable) const(double) levellevel);
}
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" " ~ "----------------------------------------- t");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("\n== lag_ratio stagger: sub_alpha for 4 submobjects, lag_ratio 0.5 ==");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" alpha sub0 sub1 sub2 sub3");
foreach ((local variable) int ii; 0 .. 11)
{
const (local variable) const(double) alphaalpha = (local variable) int ii / 10.0;
void std.stdio.writefln!(char, const(double), double, double, double, double)(in char[] fmt, const(double) __param_1, double __param_2, double __param_3, double __param_4, double __param_5) @safeEquivalent to writef(fmt, args, '\n').
writefln(" %4.1f %6.3f %6.3f %6.3f %6.3f", (local variable) const(double) alphaalpha,
double manim_rate_functions.subAlpha(double alpha, ulong i, ulong n, double lag) pure nothrow @nogc @safeManim's get_sub_alpha: submobject i of n under a given lag_ratio.
subAlpha((local variable) const(double) alphaalpha, 0, 4, 0.5), double manim_rate_functions.subAlpha(double alpha, ulong i, ulong n, double lag) pure nothrow @nogc @safeManim's get_sub_alpha: submobject i of n under a given lag_ratio.
subAlpha((local variable) const(double) alphaalpha, 1, 4, 0.5),
double manim_rate_functions.subAlpha(double alpha, ulong i, ulong n, double lag) pure nothrow @nogc @safeManim's get_sub_alpha: submobject i of n under a given lag_ratio.
subAlpha((local variable) const(double) alphaalpha, 2, 4, 0.5), double manim_rate_functions.subAlpha(double alpha, ulong i, ulong n, double lag) pure nothrow @nogc @safeManim's get_sub_alpha: submobject i of n under a given lag_ratio.
subAlpha((local variable) const(double) alphaalpha, 3, 4, 0.5));
}
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(" (lag_ratio 0 = all together; 1 = strict succession; 0.5 = overlap)");
return 0;
}