Run cargo fmt
This commit is contained in:
committed by
Sébastien Crozet
parent
eb8f6d360d
commit
16af01da42
@@ -121,12 +121,11 @@ impl BallPositionConstraint {
|
|||||||
#[cfg(feature = "dim2")]
|
#[cfg(feature = "dim2")]
|
||||||
let axis_angle = Rotation::rotation_between_axis(&axis2, &axis1).axis_angle();
|
let axis_angle = Rotation::rotation_between_axis(&axis2, &axis1).axis_angle();
|
||||||
#[cfg(feature = "dim3")]
|
#[cfg(feature = "dim3")]
|
||||||
let axis_angle = Rotation::rotation_between_axis(&axis2, &axis1).and_then(|r| r.axis_angle());
|
let axis_angle =
|
||||||
|
Rotation::rotation_between_axis(&axis2, &axis1).and_then(|r| r.axis_angle());
|
||||||
|
|
||||||
// TODO: handle the case where dot(axis1, axis2) = -1.0
|
// TODO: handle the case where dot(axis1, axis2) = -1.0
|
||||||
if let Some((axis, angle)) = axis_angle
|
if let Some((axis, angle)) = axis_angle {
|
||||||
{
|
|
||||||
|
|
||||||
if angle >= self.limits_angle {
|
if angle >= self.limits_angle {
|
||||||
#[cfg(feature = "dim2")]
|
#[cfg(feature = "dim2")]
|
||||||
let axis = axis[0];
|
let axis = axis[0];
|
||||||
@@ -242,14 +241,14 @@ impl BallPositionGroundConstraint {
|
|||||||
let axis2 = position2 * self.limits_local_axis2;
|
let axis2 = position2 * self.limits_local_axis2;
|
||||||
|
|
||||||
#[cfg(feature = "dim2")]
|
#[cfg(feature = "dim2")]
|
||||||
let axis_angle = Rotation::rotation_between_axis(&axis2, &self.limits_axis1).axis_angle();
|
let axis_angle =
|
||||||
|
Rotation::rotation_between_axis(&axis2, &self.limits_axis1).axis_angle();
|
||||||
#[cfg(feature = "dim3")]
|
#[cfg(feature = "dim3")]
|
||||||
let axis_angle = Rotation::rotation_between_axis(&axis2, &self.limits_axis1).and_then(|r| r.axis_angle());
|
let axis_angle = Rotation::rotation_between_axis(&axis2, &self.limits_axis1)
|
||||||
|
.and_then(|r| r.axis_angle());
|
||||||
|
|
||||||
// TODO: handle the case where dot(axis1, axis2) = -1.0
|
// TODO: handle the case where dot(axis1, axis2) = -1.0
|
||||||
if let Some((axis, angle)) = axis_angle
|
if let Some((axis, angle)) = axis_angle {
|
||||||
{
|
|
||||||
|
|
||||||
if angle >= self.limits_angle {
|
if angle >= self.limits_angle {
|
||||||
#[cfg(feature = "dim2")]
|
#[cfg(feature = "dim2")]
|
||||||
let axis = axis[0];
|
let axis = axis[0];
|
||||||
|
|||||||
@@ -185,12 +185,11 @@ impl BallVelocityConstraint {
|
|||||||
#[cfg(feature = "dim2")]
|
#[cfg(feature = "dim2")]
|
||||||
let axis_angle = Rotation::rotation_between_axis(&axis2, &axis1).axis_angle();
|
let axis_angle = Rotation::rotation_between_axis(&axis2, &axis1).axis_angle();
|
||||||
#[cfg(feature = "dim3")]
|
#[cfg(feature = "dim3")]
|
||||||
let axis_angle = Rotation::rotation_between_axis(&axis2, &axis1).and_then(|r| r.axis_angle());
|
let axis_angle =
|
||||||
|
Rotation::rotation_between_axis(&axis2, &axis1).and_then(|r| r.axis_angle());
|
||||||
|
|
||||||
// TODO: handle the case where dot(axis1, axis2) = -1.0
|
// TODO: handle the case where dot(axis1, axis2) = -1.0
|
||||||
if let Some((axis, angle)) = axis_angle
|
if let Some((axis, angle)) = axis_angle {
|
||||||
{
|
|
||||||
|
|
||||||
if angle >= joint.limits_angle {
|
if angle >= joint.limits_angle {
|
||||||
#[cfg(feature = "dim2")]
|
#[cfg(feature = "dim2")]
|
||||||
let axis = axis[0];
|
let axis = axis[0];
|
||||||
@@ -528,12 +527,11 @@ impl BallVelocityGroundConstraint {
|
|||||||
#[cfg(feature = "dim2")]
|
#[cfg(feature = "dim2")]
|
||||||
let axis_angle = Rotation::rotation_between_axis(&axis2, &axis1).axis_angle();
|
let axis_angle = Rotation::rotation_between_axis(&axis2, &axis1).axis_angle();
|
||||||
#[cfg(feature = "dim3")]
|
#[cfg(feature = "dim3")]
|
||||||
let axis_angle = Rotation::rotation_between_axis(&axis2, &axis1).and_then(|r| r.axis_angle());
|
let axis_angle =
|
||||||
|
Rotation::rotation_between_axis(&axis2, &axis1).and_then(|r| r.axis_angle());
|
||||||
|
|
||||||
// TODO: handle the case where dot(axis1, axis2) = -1.0
|
// TODO: handle the case where dot(axis1, axis2) = -1.0
|
||||||
if let Some((axis, angle)) = axis_angle
|
if let Some((axis, angle)) = axis_angle {
|
||||||
{
|
|
||||||
|
|
||||||
if angle >= joint.limits_angle {
|
if angle >= joint.limits_angle {
|
||||||
#[cfg(feature = "dim2")]
|
#[cfg(feature = "dim2")]
|
||||||
let axis = axis[0];
|
let axis = axis[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user