Collection of helper functions not fitting anywhere else
pub sync fn angle_to_180 ( angle : float ) -> float
Parameters
Name | Type | Optional | Description |
---|---|---|---|
angle | float |
pub sync fn angle_to_360 ( angle : float ) -> float
Parameters
Name | Type | Optional | Description |
---|---|---|---|
angle | float |
pub sync fn global_ship_is_facing ( vessel : ksp::vessel::Vessel,
desired_facing : ksp::math::GlobalVector,
max_deviation_degrees : float,
max_angular_velocity : float ) -> bool
Parameters
Name | Type | Optional | Description |
---|---|---|---|
vessel | ksp::vessel::Vessel | ||
desired_facing | ksp::math::GlobalVector | ||
max_deviation_degrees | float | ||
max_angular_velocity | float |
pub sync fn remove_all_nodes ( vessel : ksp::vessel::Vessel ) -> Unit
Parameters
Name | Type | Optional | Description |
---|---|---|---|
vessel | ksp::vessel::Vessel |
pub sync fn ship_is_facing ( vessel : ksp::vessel::Vessel,
desired_facing : ksp::math::Vec3,
max_deviation_degrees : float,
max_angular_velocity : float ) -> bool
Determine if vessel
is facing a given direction.
max_deviation_degrees
sets a limit how many degrees the angle may differmax_angular_velocity
sets a limit how much thevessel
may still be turning
Parameters
Name | Type | Optional | Description |
---|---|---|---|
vessel | ksp::vessel::Vessel | ||
desired_facing | ksp::math::Vec3 | ||
max_deviation_degrees | float | ||
max_angular_velocity | float |