avg VEX function

Returns the average of the vector’s 3 components

Contexts: image3d, chop, cop, pop, sop, surface, displace, fog, light, shadow, photon, cvex

  1. float avg(vector v)

    Returns the average of the vector’s 3 components

  2. float avg(float a, float b)

    Returns the average of a and b.

  3. vector avg(vector , vector )

    Returns the average of the two vectors.

  4. vector4 avg(vector4 , vector4 )

    Returns the average of the two vectors.

  5. float avg(float[] arr)

    Returns the average of the floats in the array.