math_and_overrides#

Math and override functions.

Functions

aligned_pts(points)

Are the three points aligned? with decimal_precision.

cross(vector_1, vector_2)

Numpy cross product with decimal_precision.

dot(vector_1, vector_2)

Numpy dot product with decimal_precision.

round(value)

Numpy rounding with decimal_precision.

set_decimal_precision(value)

Override the decimal_precision default (10).

cross(vector_1: array, vector_2: array) float[source]#

Numpy cross product with decimal_precision.

Parameters:
  • vector_1 (np.array) – First of the cross product vectors

  • vector_2 (np.array) – Second of the cross product vectors

Returns:

Rounded cross product

Return type:

float

dot(vector_1: array, vector_2: array) float[source]#

Numpy dot product with decimal_precision.

Parameters:
  • vector_1 (np.array) – First of the dot product vectors

  • vector_2 (np.array) – Second of the dot product vectors

Returns:

Rounded dot product

Return type:

float

round(value) float[source]#

Numpy rounding with decimal_precision.

Parameters:

value – Any numerical type supported by np.round()

Returns:

Rounded number

Return type:

float

set_decimal_precision(value: int)[source]#

Override the decimal_precision default (10).

Parameters:

value – Any integer. If present, decimal part will be truncated (flooring)