Interface for a reversible function.
class Vector2 { constructor(public x: number, public y: number); } const field: ReversibleBiFunction<number, Vector2> = { forward: (x, y) => new Vector2(2*x , 2*y), backward: r => [0.5 * r.x, 0.5 * r.y], } const r = field.forward(2, 1); // => Vector2(4, 2) field.backward(r); // => [2, 1]
Type of the function return value.
Type of the first function argument.
Type of the second function argument.
Generated using TypeDoc
Interface for a reversible function.
class Vector2 { constructor(public x: number, public y: number); } const field: ReversibleBiFunction<number, Vector2> = { forward: (x, y) => new Vector2(2*x , 2*y), backward: r => [0.5 * r.x, 0.5 * r.y], } const r = field.forward(2, 1); // => Vector2(4, 2) field.backward(r); // => [2, 1]
Type of the function return value.