Tool#
Function to check the validation of the input
- tool.convert_to_polar(pos_car)#
Converts cartesian coordinates to polar coordinates.
- Parameters
pos_car (numpy.ndarray) – A numpy array containing the x-coordinate and y-coordinate of the point.
- Returns
A numpy array containing the radius and angle of the point.
- Return type
numpy.ndarray
- tool.is_planet_pos_allowed(pos, mode)#
Checks if the input planet position is valid based on the specified mode.
- Parameters
pos (list or numpy.ndarray) – The planet position.
mode (str) – The mode to determine the validity of the position.
- Returns
True if the planet position is valid, False otherwise.
- Return type
bool
- tool.is_positive_even_integer(number)#
Checks if the input number is a positive even integer.
- Parameters
number (int) – The number to check.
- Returns
True if the number is a positive even integer, False otherwise.
- Return type
bool