LlAngleBetween/zh-Hant

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

概要

函式: float llAngleBetween( rotation a, rotation b );
174 函式ID
0.0 延遲
10.0 能量

回傳一個float為ab之間的角度。

• rotation a start rotation
• rotation b end rotation

注意事項

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   llAngleBetween() is sometimes inaccurate

範例

參照

函式

•  llRotBetween
•  llRot2Angle Similar functionality used for the Axis-Angle format

Deep Notes

<lsl>float AngleBetween(rotation a, rotation b) {

   return 2.0 * llAcos((a.x * b.x + a.y * b.y + a.z * b.z + a.s * b.s)
              / llSqrt((a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s)
                     * (b.x * b.x + b.y * b.y + b.z * b.z + b.s * b.s)));

}</lsl>

All Issues

~ Search JIRA for related Issues
   llAngleBetween() is sometimes inaccurate