| Date: Thu, 18 Mar 2021 11:31:10 +0100
grain.c: change type of exponent in pow(3) calls
Diffstat:
M grain.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- |
| t@@ -230,7 +230,7 @@ grain_check_values(const struct grain *g)
double
grain_volume(const struct grain *g)
{
- return 4.0 / 3.0 * PI * pow(g->radius, 3);
+ return 4.0 / 3.0 * PI * pow(g->radius, 3.0);
}
double
t@@ -242,7 +242,7 @@ grain_mass(const struct grain *g)
double
grain_moment_of_inertia(const struct grain *g)
{
- return 2.0 / 5.0 * grain_mass(g) * pow(g->radius, 2);
+ return 2.0 / 5.0 * grain_mass(g) * pow(g->radius, 2.0);
}
void |