Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
Signed-off-by: Benjamin Perseghetti <[email protected]>
  • Loading branch information
bperseghetti and ahcorde committed May 16, 2024
1 parent cbd801b commit 6c121d7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
12 changes: 6 additions & 6 deletions include/gz/math/Cone.hh
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ namespace gz
/// \param[in] _radius Radius of the cone.
/// \param[in] _rotOffset Rotational offset of the cone.
public: Cone(const Precision _length, const Precision _radius,
const Quaternion<Precision> &_rotOffset =
Quaternion<Precision>::Identity);
const Quaternion<Precision> &_rotOffset =
Quaternion<Precision>::Identity);

/// \brief Construct a cone with a length, radius, material and
/// optionally a rotational offset.
Expand All @@ -67,9 +67,9 @@ namespace gz
/// \param[in] _mat Material property for the cone.
/// \param[in] _rotOffset Rotational offset of the cone.
public: Cone(const Precision _length, const Precision _radius,
const Material &_mat,
const Quaternion<Precision> &_rotOffset =
Quaternion<Precision>::Identity);
const Material &_mat,
const Quaternion<Precision> &_rotOffset =
Quaternion<Precision>::Identity);

/// \brief Get the radius in meters.
/// \return The radius of the cone in meters.
Expand All @@ -95,7 +95,7 @@ namespace gz
public: Quaternion<Precision> RotationalOffset() const;

/// \brief Set the rotation offset.
/// \param[in] _rotOffset
/// \param[in] _rotOffset rotational offset quaternion.
/// See Quaternion<Precision> RotationalOffset() for details on the
/// rotational offset.
/// \sa Quaternion<Precision> RotationalOffset() const
Expand Down
17 changes: 9 additions & 8 deletions include/gz/math/MassMatrix3.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define GZ_MATH_MASSMATRIX3_HH_

#include <algorithm>
#include <cmath>
#include <limits>
#include <string>
#include <vector>
Expand Down Expand Up @@ -939,9 +940,9 @@ namespace gz
/// \param[in] _rot Rotational offset of equivalent cone.
/// \return True if inertial properties were set successfully.
public: bool SetFromConeZ(const Material &_mat,
const T _length,
const T _radius,
const Quaternion<T> &_rot = Quaternion<T>::Identity)
const T _length,
const T _radius,
const Quaternion<T> &_rot = Quaternion<T>::Identity)
{
// Check that density, _radius and _length are strictly positive
// and that quaternion is valid
Expand All @@ -963,9 +964,9 @@ namespace gz
/// \param[in] _rot Rotational offset of equivalent cone.
/// \return True if inertial properties were set successfully.
public: bool SetFromConeZ(const T _mass,
const T _length,
const T _radius,
const Quaternion<T> &_rot = Quaternion<T>::Identity)
const T _length,
const T _radius,
const Quaternion<T> &_rot = Quaternion<T>::Identity)
{
// Check that _mass, _radius and _length are strictly positive
// and that quaternion is valid
Expand All @@ -985,8 +986,8 @@ namespace gz
/// \param[in] _rot Rotational offset of equivalent cone.
/// \return True if inertial properties were set successfully.
public: bool SetFromConeZ(const T _length,
const T _radius,
const Quaternion<T> &_rot)
const T _radius,
const Quaternion<T> &_rot)
{
// Check that _mass and _size are strictly positive
// and that quaternion is valid
Expand Down
16 changes: 8 additions & 8 deletions src/ruby/MassMatrix3.i
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ namespace gz
const T _radius,
const Quaternion<T> &_rot);
public: bool SetFromConeZ(const Material &_mat,
const T _length,
const T _radius,
const Quaternion<T> &_rot = Quaternion<T>::Identity);
const T _length,
const T _radius,
const Quaternion<T> &_rot = Quaternion<T>::Identity);
public: bool SetFromConeZ(const T _mass,
const T _length,
const T _radius,
const Quaternion<T> &_rot = Quaternion<T>::Identity);
const T _length,
const T _radius,
const Quaternion<T> &_rot = Quaternion<T>::Identity);
public: bool SetFromConeZ(const T _length,
const T _radius,
const Quaternion<T> &_rot);
const T _radius,
const Quaternion<T> &_rot);
public: bool SetFromSphere(const Material &_mat, const T _radius);
public: bool SetFromSphere(const T _mass, const T _radius);
public: bool SetFromSphere(const T _radius);
Expand Down

0 comments on commit 6c121d7

Please sign in to comment.