Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Calculates the body mass index with the specified inividual's mass and height.
- * @param mass The mass of the individual, in kilograms.
- * @param height The height of the individual, in meters.
- * @return The calculated body mass index.
- */
- public static final double calculateBMIMetric(final double mass, final double height) {
- return (mass / (Math.pow(height, 2)));
- }
- /**
- * Calculates the body mass index with the specified inividual's mass and height.
- * @param mass The mass of the individual, in pounds.
- * @param height The height of the individual, in inches.
- * @return The calculated body mass index.
- */
- public static final double calculateBMIImperial(final double mass, final double height) {
- return (mass / (Math.pow(height, 2)) * 703.06957964);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement