Skip to content

Commit

Permalink
C++ sample formatting and float shenanigans
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Jul 30, 2024
1 parent 02cd0bc commit 5baf54a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/snippets/all/archetypes/leaf_transforms3d_combined.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ int main() {
"world/box",
rerun::Transform3D::from_rotation(rerun::RotationAxisAngle{
{0.0f, 0.0f, 1.0f},
rerun::Angle::degrees(static_cast<float>(i) * 2.0f)
})
rerun::Angle::degrees(static_cast<float>(i) * 2.0f)})
);

// Log an leaf transform which affects only the box.
rec.log(
"world/box",
rerun::LeafTransforms3D().with_translations(
{{0, 0, fabs(static_cast<float>(i) * 0.1f - 5.0f) - 5.0f}}
{{0.0f, 0.0f, std::abs(static_cast<float>(i) * 0.1f - 5.0f) - 5.0f}}
)
);
}
Expand Down

0 comments on commit 5baf54a

Please sign in to comment.