参考 mag()

mag()

Calculates the magnitude (length) of the vector.

Use mag() to calculate the magnitude of a 2D vector using components as in mag(x, y).

示例

语法

mag()

参数

返回值

Number: magnitude of the vector.

相关参考