parent
461d153036
commit
a41d53b911
|
@ -278,7 +278,7 @@ namespace Oyster { namespace Physics3D
|
|||
/** @todo TODO: add MomentOfInertia tensor formulas */
|
||||
inline ::Oyster::Math::Float CalculateSphere( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius )
|
||||
{
|
||||
return ::Utility::Value::Radian( 2.0f / 5.0f ) * mass * radius * radius;
|
||||
return (2.0f/5.0f)*mass*radius*radius;
|
||||
}
|
||||
|
||||
inline ::Oyster::Math::Float4x4 Sphere( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius )
|
||||
|
@ -293,7 +293,7 @@ namespace Oyster { namespace Physics3D
|
|||
|
||||
inline ::Oyster::Math::Float CalculateHollowSphere( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius )
|
||||
{
|
||||
return ::Utility::Value::Radian( 2.0f / 3.0f ) * mass * radius * radius;
|
||||
return (2.0f/3.0f)*mass*radius*radius;
|
||||
}
|
||||
|
||||
inline ::Oyster::Math::Float4x4 HollowSphere( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius )
|
||||
|
@ -308,17 +308,17 @@ namespace Oyster { namespace Physics3D
|
|||
|
||||
inline ::Oyster::Math::Float CalculateCuboidX( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float depth )
|
||||
{
|
||||
return ::Utility::Value::Radian( 1.0f / 12.0f ) * mass * (height * height + depth * depth);
|
||||
return (1.0f/12.0f)*mass*(height*height + depth*depth);
|
||||
}
|
||||
|
||||
inline ::Oyster::Math::Float CalculateCuboidY( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float width, const ::Oyster::Math::Float depth )
|
||||
{
|
||||
return ::Utility::Value::Radian( 1.0f / 12.0f ) * mass * (width * width + depth * depth );
|
||||
return (1.0f/12.0f)*mass*(width*width + depth*depth);
|
||||
}
|
||||
|
||||
inline ::Oyster::Math::Float CalculateCuboidZ( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float width, const ::Oyster::Math::Float height )
|
||||
{
|
||||
return ::Utility::Value::Radian( 1.0f / 12.0f ) * mass * (height * height + width * width );
|
||||
return (1.0f/12.0f)*mass*(height*height + width*width);
|
||||
}
|
||||
|
||||
inline ::Oyster::Math::Float4x4 Cuboid( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float width, const ::Oyster::Math::Float depth )
|
||||
|
@ -333,7 +333,7 @@ namespace Oyster { namespace Physics3D
|
|||
|
||||
inline ::Oyster::Math::Float CalculateRodCenter( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float length )
|
||||
{
|
||||
return ::Utility::Value::Radian( 1.0f / 12.0f ) * mass * length * length;
|
||||
return (1.0f/12.0f)*mass*(length*length);
|
||||
}
|
||||
|
||||
inline ::Oyster::Math::Float4x4 RodCenter( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float length )
|
||||
|
@ -348,12 +348,12 @@ namespace Oyster { namespace Physics3D
|
|||
|
||||
inline ::Oyster::Math::Float CalculateCylinderXY( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float radius )
|
||||
{
|
||||
return ::Utility::Value::Radian( 1.0f / 12.0f ) * mass * ( 3.0f * radius * radius + height * height );
|
||||
return (1.0f/12.0f)*mass*(3.0f*radius*radius + height*height);
|
||||
}
|
||||
|
||||
inline ::Oyster::Math::Float CalculateCylinderZ( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float radius )
|
||||
{
|
||||
return ::Utility::Value::Radian( 0.5f ) * mass * ( radius * radius );
|
||||
return 0.5f*mass*(radius*radius);
|
||||
}
|
||||
|
||||
inline ::Oyster::Math::Float4x4 Cylinder( const ::Oyster::Math::Float mass, const ::Oyster::Math::Float height, const ::Oyster::Math::Float radius )
|
||||
|
|
Loading…
Reference in New Issue