LlSin
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| Function: float llSin( float theta ); |
| 参数:•浮动θ–以弧度表示的角度 |
| 返回值:返回θ的正弦值的浮点值。 |
| 注意事项 |
|---|
| 由于浮点上的IEE754,llSin(PI)返回-8.742278E-8(十六进制:0xB3BBBD2E),而不是0.0。误差以PI的倍数累加:例如llSin(100000.0*PI)=0.015890,结果应该是0.0 |
| 示例 |
|---|
示例1
// Touch the object with this script in it to see the sine of random numbers!
default
{
touch_start(integer num)
{
float r = llFrand(TWO_PI);
llOwnerSay("The sine of " + (string)r + " in radians or " + (string)(r * RAD_TO_DEG) + " in degrees is " + (string)llSin(r));
}
}
|
| 相关函数 |
|---|
| llAsin–反正弦 |
| 相关事件 |
|---|
| 无 |