diff --git a/src/Cone_TEST.cc b/src/Cone_TEST.cc index f929707c9..41295e34a 100644 --- a/src/Cone_TEST.cc +++ b/src/Cone_TEST.cc @@ -32,7 +32,8 @@ TEST(DOMCone, Construction) sdf::Cone cone; EXPECT_EQ(nullptr, cone.Element()); // A default cone has a length of 1 meter and radius if 0.5 meters. - EXPECT_DOUBLE_EQ(GZ_PI * std::pow(0.5, 2) * 1.0, cone.Shape().Volume()); + EXPECT_DOUBLE_EQ(GZ_PI * std::pow(0.5, 2) * 1.0 / 3.0, + cone.Shape().Volume()); EXPECT_DOUBLE_EQ(0.5, cone.Radius()); EXPECT_DOUBLE_EQ(1.0, cone.Length()); @@ -55,7 +56,8 @@ TEST(DOMCone, MoveConstructor) EXPECT_DOUBLE_EQ(0.2, cone2.Radius()); EXPECT_DOUBLE_EQ(3.0, cone2.Length()); - EXPECT_DOUBLE_EQ(GZ_PI * std::pow(0.2, 2) * 3.0, cone2.Shape().Volume()); + EXPECT_DOUBLE_EQ(GZ_PI * std::pow(0.2, 2) * 3.0 / 3.0, + cone2.Shape().Volume()); EXPECT_DOUBLE_EQ(0.2, cone2.Shape().Radius()); EXPECT_DOUBLE_EQ(3.0, cone2.Shape().Length()); } diff --git a/src/ParticleEmitter.cc b/src/ParticleEmitter.cc index dad6ff3e8..75c7ac438 100644 --- a/src/ParticleEmitter.cc +++ b/src/ParticleEmitter.cc @@ -38,9 +38,9 @@ constexpr std::array kEmitterTypeStrs = { "point", "box", - "cone", "cylinder", "ellipsoid", + "cone", }; class sdf::ParticleEmitter::Implementation