WT 1.26
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
+3
-18
@@ -44,7 +44,7 @@ mixin Common {
|
||||
String getDateLocale(DateTime datetime, bool timeDisplay) {
|
||||
var date = datetime;
|
||||
|
||||
String dateName = DateFormat(DateFormat.YEAR_MONTH_DAY, AppLanguage().appLocal.toString()).format(date.toUtc());
|
||||
String dateName = DateFormat(DateFormat.YEAR_NUM_MONTH_DAY, AppLanguage().appLocal.toString()).format(date.toUtc());
|
||||
if (timeDisplay) {
|
||||
dateName += " " + DateFormat(DateFormat.HOUR_MINUTE, AppLanguage().appLocal.toString()).format(date.toUtc());
|
||||
}
|
||||
@@ -82,20 +82,6 @@ mixin Common {
|
||||
return ((dayOfYear - date.weekday + 10) / 7).floor();
|
||||
}
|
||||
|
||||
String getDatePart(DateTime date, String dateRate) {
|
||||
String datePart = DateFormat('MM.dd', AppLanguage().appLocal.toString()).format(date);
|
||||
if (dateRate == DateRate.weekly) {
|
||||
datePart = weekNumber(date).toString();
|
||||
} else if (dateRate == DateRate.monthly) {
|
||||
datePart = DateFormat('MMM', AppLanguage().appLocal.toString()).format(date);
|
||||
} else if (dateRate == DateRate.yearly) {
|
||||
datePart = DateFormat('y', AppLanguage().appLocal.toString()).format(date);
|
||||
} else if (dateRate == DateRate.daily) {
|
||||
datePart = DateFormat('MM.dd', AppLanguage().appLocal.toString()).format(date);
|
||||
}
|
||||
return datePart;
|
||||
}
|
||||
|
||||
static String? emailValidation(String? email) {
|
||||
final String error = "Please type an email address";
|
||||
if (email == null) {
|
||||
@@ -146,7 +132,7 @@ mixin Common {
|
||||
return value;
|
||||
}
|
||||
|
||||
static double calculate1RM(double weight, double repeat) {
|
||||
double calculate1RM(double weight, double repeat) {
|
||||
if (weight == 0 || repeat == 0) {
|
||||
return 0;
|
||||
}
|
||||
@@ -207,8 +193,7 @@ mixin Common {
|
||||
final double repeatWendler = (rmWendler - changedWeight) / 0.0333 / changedWeight;
|
||||
final double repeatOconner = (rmOconner / changedWeight - 1) * 40;
|
||||
final newRepeat = ((repeatOconner + repeatWendler) / 2).ceil();
|
||||
print(
|
||||
"Weight: $weight changedWeight: $changedWeight repeatWendler: $repeatWendler repeat Oconner: $repeatOconner. NEW REPEAT: $newRepeat");
|
||||
print("Weight: $weight changedWeight: $changedWeight repeatWendler: $repeatWendler repeat Oconner: $repeatOconner. NEW REPEAT: $newRepeat");
|
||||
return newRepeat;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import 'package:aitrainer_app/model/exercise.dart';
|
||||
|
||||
abstract class GroupData {
|
||||
void iteration();
|
||||
|
||||
bool checkNewType(Exercise exercise);
|
||||
|
||||
void addTempData(Exercise element);
|
||||
|
||||
void temp2Output(Exercise exercise);
|
||||
|
||||
void resetTemp();
|
||||
}
|
||||
|
||||
class DiagramData {
|
||||
final String x;
|
||||
final double? y;
|
||||
DiagramData(this.x, this.y);
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {"x": this.x, "y": this.y};
|
||||
return json;
|
||||
}
|
||||
|
||||
String toString() => this.toJson().toString();
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import 'package:aitrainer_app/model/exercise.dart';
|
||||
|
||||
abstract class GroupData {
|
||||
|
||||
void iteration();
|
||||
|
||||
bool checkNewType(Exercise exercise);
|
||||
|
||||
void addTempData(Exercise element);
|
||||
|
||||
void temp2Output(Exercise exercise);
|
||||
|
||||
void resetTemp();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user