getStandardWeightDouble static method

double getStandardWeightDouble(
  1. int sex,
  2. double height
)

标准体重 @param: sex(1: male; Others: Female) @param: height(cm) @result: (kg)

Implementation

static double getStandardWeightDouble(int sex, double height) {
  if (sex == 1) {
    return (height - 80) * 0.7;
  } else {
    return (height - 70) * 0.6;
  }
}