RandomUnitVectorInCone

From Onset Developer Wiki
Revision as of 22:28, 29 September 2019 by BlueMountains (talk | contribs) (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,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
RandomUnitVectorInCone

Type: Function
Context: Server & Client
Introduced: v1.0

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__

See also

RandomUnitVectorInEllipticalCone