Skip to content

Commit

Permalink
complete doc
Browse files Browse the repository at this point in the history
  • Loading branch information
makeecat committed Aug 31, 2024
1 parent 0fef3f3 commit 1ee624c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1159,14 +1159,14 @@ pub fn create_planner(
))),
}
}
// Helper function to parse Vector3 from YAML
// # Arguments
// * `value` - YAML value
// * `key` - key to parse
// # Returns
// * `Vector3<f32>` - parsed vector
// # Errors
// * `SimulationError` - if the value is not a valid vector
/// Helper function to parse Vector3 from YAML
/// # Arguments
/// * `value` - YAML value
/// * `key` - key to parse
/// # Returns
/// * `Vector3<f32>` - parsed vector
/// # Errors
/// * `SimulationError` - if the value is not a valid vector
pub fn parse_vector3(
value: &serde_yaml::Value,
key: &str,
Expand All @@ -1186,14 +1186,14 @@ pub fn parse_vector3(
})
.ok_or_else(|| SimulationError::OtherError(format!("Invalid {} vector", key)))
}
// Helper function to parse f32 from YAML
// # Arguments
// * `value` - YAML value
// * `key` - key to parse
// # Returns
// * `f32` - parsed value
// # Errors
// * `SimulationError` - if the value is not a valid f32
/// Helper function to parse f32 from YAML
/// # Arguments
/// * `value` - YAML value
/// * `key` - key to parse
/// # Returns
/// * `f32` - parsed value
/// # Errors
/// * `SimulationError` - if the value is not a valid f32
pub fn parse_f32(value: &serde_yaml::Value, key: &str) -> Result<f32, SimulationError> {
value[key]
.as_f64()
Expand Down

0 comments on commit 1ee624c

Please sign in to comment.