用户工具

站点工具

Action disabled: source

reference:language:sq

sq()

例子

float a = sq(1);   // Sets a to 1
float b = sq(-5);  // Sets b to 25
float c = sq(9);   // Sets c to 81

描述

求平方值,结果总是正数。例如, -1 * -1 = 1.

语法

sq(value)

参数

value int or float

返回 float

reference/language/sq.txt · 最后更改: 2023/06/07 04:23 由 127.0.0.1