wt1.1.2 new treeview, bar chart for muscle development

This commit is contained in:
Bossanyi Tibor
2020-09-27 18:42:28 +02:00
parent 4a193e085f
commit 89c06123d2
43 changed files with 2135 additions and 514 deletions
+15
View File
@@ -0,0 +1,15 @@
mixin Calculate {
double calculate1RM(double quantity, double unitQuantity) {
double weight = unitQuantity;
double repeat = quantity;
if ( weight == 0 || repeat == 0) {
return 0;
}
double rmWendler = weight * repeat * 0.0333 + weight;
double rmOconner = weight * (1 + repeat / 40);
double average = (rmWendler + rmOconner)/2;
return average;
}
}
+6
View File
@@ -73,4 +73,10 @@ mixin Common {
return _passwordRegExp.hasMatch(password);
}
/// Calculates week number from a date as per https://en.wikipedia.org/wiki/ISO_week_date#Calculation
int weekNumber(DateTime date) {
int dayOfYear = int.parse(DateFormat("D").format(date));
return ((dayOfYear - date.weekday + 10) / 7).floor();
}
}