RandomUnitVectorInCone

From Onset Developer Wiki
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.
RandomUnitVectorInCone

Type: Function
Context: 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