psychopy.tools.mathtools.bisector

psychopy.tools.mathtools.bisector(v0, v1, norm=False, out=None, dtype=None)[source]

Get the angle bisector.

Computes a vector which bisects the angle between v0 and v1. Input vectors v0 and v1 must be non-zero.

Parameters
  • v0 (array_like) – Vectors to bisect [x, y, z]. Must be non-zero in length and have the same shape. Inputs can be Nx3 where the bisector for corresponding rows will be returned.

  • v1 (array_like) – Vectors to bisect [x, y, z]. Must be non-zero in length and have the same shape. Inputs can be Nx3 where the bisector for corresponding rows will be returned.

  • norm (bool, optional) – Normalize the resulting bisector. Default is False.

  • out (ndarray, optional) – Optional output array. Must be same shape and dtype as the expected output if out was not specified.

  • dtype (dtype or str, optional) – Data type for computations can either be ‘float32’ or ‘float64’. If out is specified, the data type of out is used and this argument is ignored. If out is not provided, ‘float64’ is used by default.

Returns

Bisecting vector [x, y, z].

Return type

ndarray


Back to top