Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface for a reversible function.

class Vector3 {
  constructor(public x: number, public y: number, public z: number);
}

const field: ReversibleTriFunction<number, Vector3> = {
  forward: (x, y, z) => new Vector3(2*x , 2*y, 2*z),
  backward: r => [0.5 * r.x, 0.5 * r.y, 0.5 * r.z],
}

const r = field.forward(2, 1, 4); // => Vector3(4, 2, 8)
field.backward(r); // => [2, 1, 4]
typeparam

Type of the function return value.

Type parameters

  • TParam1

    Type of the first function argument.

  • TParam2

    Type of the second function argument.

  • TParam3

    Type of the third function argument.

  • TReturn

Hierarchy

  • ReversibleTriFunction

Index

Methods

Methods

backward

  • backward(param: TReturn): Triple<TParam1, TParam2, TParam3>
  • Parameters

    • param: TReturn

    Returns Triple<TParam1, TParam2, TParam3>

forward

  • forward(param1: TParam1, param2: TParam2, param3: TParam3): TReturn
  • Parameters

    • param1: TParam1
    • param2: TParam2
    • param3: TParam3

    Returns TReturn

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc