From 3f2f92a1f48783f10692ae2defaf57585805b704 Mon Sep 17 00:00:00 2001 From: rodri Date: Wed, 30 Jun 2021 19:30:06 +0000 Subject: =?UTF-8?q?workout:=20ignore=20shell-style=20comments=20from=20inp?= =?UTF-8?q?ut=20when=20adding=20reps=20per=20exercise.=20default.session:?= =?UTF-8?q?=20updated=20program.=20exercises:=20some=20corrections=20and?= =?UTF-8?q?=20new=20stuff.=20added=20new=20scripts=20to=20register=20age,?= =?UTF-8?q?=20height,=20=CE=94weight/dt,=20BSA=20and=20SBSI=20(the=20latte?= =?UTF-8?q?r=20too=20technical=20to=20be=20useful=20for=20me=20but=20were?= =?UTF-8?q?=20fun=20rc=20practice.)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sbsi | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 sbsi (limited to 'sbsi') diff --git a/sbsi b/sbsi new file mode 100755 index 0000000..beb4c58 --- /dev/null +++ b/sbsi @@ -0,0 +1,33 @@ +#!/bin/rc +# +# Surface-based Body Shape Index (SBSI) +# H(cm)^7/4 * WC(cm)^5/6 +# SBSI = ------------------------ +# BSA(m²) * VTC(cm) +# where WC is waist circumference and VTC is the vertical trunk one. +# +rfork ne +vtc=() +wc=() +w=() +h=() +flagfmt='' +args='vtc wc weight height' + +fn usage { + aux/usage + exit usage +} + +if(! ifs=() eval `{aux/getflags $*} || ! ~ $#* 4) + usage + +vtc=$1 +wc=$2 +w=$3 +h=$4 +bsa=`{bsa $w $h} + +hoc <