tryNormalizeInPlaceWithAreaWeight Method

Normalize the ray direction in place.

  • If parameter a is clearly nonzero and the direction vector can be normalized,
    • Save the parameter a as the optional a member of the ray.
    • Normalize the ray's direction vector.
  • If parameter a is nearly zero,
    • Set the a member to zero.
    • Set the ray's direction vector to zero.

tryNormalizeInPlaceWithAreaWeight(a: number): boolean

@returns true if a is nonzero and normalization was successful. Otherwise, return false.

Parameter Type Description
a number value to be saved (e.g,. area).

Returns - boolean

true if a is nonzero and normalization was successful. Otherwise, return false.

Defined in

Last Updated: 14 November, 2024