Vec.opDispatch

Named setter for common vector fields, which allows you to set the value of specific elements in the vector according to conventional names. - x for the first element. - y for the second element. - z for the third element. - w for the fourth element.

  1. T opDispatch()
  2. void opDispatch(V value)
    struct Vec(T, size_t size)
    @nogc
    void
    opDispatch
    (
    string s
    V
    )
    ()
    if (
    isNumeric!V
    )
    if (
    isNumeric!T &&
    size > 0
    )

Parameters

value V

The value to set. It can be any numeric value, but it'll be cast to the vector's type.

Meta