qc.Math.average

Prototype

  • number average(n1, n2, ...)

Paramters

Paramter Type Description
n1 ... number The numbers to average
return number The average of all given values.

Description

Averages all values passed to the function and returns the result.

Example

    // return 3
    var ret = game.math.average(1,2,4,5);