wt1.1.2 new treeview, bar chart for muscle development
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user