RandomUnitVectorInCone: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Server & Client|1.0}} {{FuncDescription|Returns a normalized vector (length 1) that is inside the specified cone.}} {{FuncSyntax|RandomUnitVectorInCone(x, y,..." |
No edit summary |
||
Line 3: | Line 3: | ||
{{FuncDescription|Returns a normalized vector (length 1) that is inside the specified cone.}} | {{FuncDescription|Returns a normalized vector (length 1) that is inside the specified cone.}} | ||
{{FuncSyntax|RandomUnitVectorInCone(x, y, z, | {{FuncSyntax|RandomUnitVectorInCone(x, y, z, HalfAngle)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
Line 9: | Line 9: | ||
{{FuncParam|y|Center X of the cone.}} | {{FuncParam|y|Center X of the cone.}} | ||
{{FuncParam|z|Center X of the cone.}} | {{FuncParam|z|Center X of the cone.}} | ||
{{FuncParam| | {{FuncParam|HalfAngle|Half the angle of the cone in degrees.}} | ||
{{FuncReturnValue|Return a unit vector.}} | {{FuncReturnValue|Return a unit vector.}} |
Revision as of 22:31, 29 September 2019
Description
Returns a normalized vector (length 1) that is inside the specified cone.
Syntax
RandomUnitVectorInCone(x, y, z, HalfAngle)
Parameters
- x
Center X of the cone. - y
Center X of the cone. - z
Center X of the cone. - HalfAngle
Half the angle of the cone in degrees.
Return Value
- Return a unit vector.
Example
__EDIT_ME__