WT 1.1.18+4 A/B Test sales page
This commit is contained in:
+16
-1
@@ -139,6 +139,9 @@ mixin Common {
|
||||
}
|
||||
|
||||
static normalizeDecimal(String value) {
|
||||
if (value.isEmpty) {
|
||||
return 0;
|
||||
}
|
||||
value = value.replaceFirst(",", ".");
|
||||
value = value.replaceAll(RegExp(r'[^0-9.]'), "");
|
||||
return value;
|
||||
@@ -193,7 +196,6 @@ mixin Common {
|
||||
static int calculateQuantityByChangedWeight(double initialRM, double weight, double repeat) {
|
||||
final double rmWendler = weight * repeat * 0.0333 + weight;
|
||||
final double rmOconner = weight * (1 + repeat / 40);
|
||||
//print("Weight: $weight oneRepQuantity: $repeat, $rmWendler, Oconner: $rmOconner");
|
||||
|
||||
final double repeatWendler = (rmWendler - weight) / 0.0333 / weight;
|
||||
final double repeatOconner = (rmOconner / weight - 1) * 40;
|
||||
@@ -201,4 +203,17 @@ mixin Common {
|
||||
//print("Initial 1RM: $initialRM Weight: $weight repeatWendler: $repeatWendler repeat Oconner: $repeatOconner. NEW REPEAT: $newRepeat");
|
||||
return newRepeat;
|
||||
}
|
||||
|
||||
static double calculateWeigthByChangedQuantity(double weight, double repeat, double changedRepeats) {
|
||||
final double rmWendler = weight * repeat * 0.0333 + weight;
|
||||
final double rmOconner = weight * (1 + repeat / 40);
|
||||
final double initialRM = (rmWendler + rmOconner) / 2;
|
||||
|
||||
final double weightWendler = rmWendler / (changedRepeats * 0.0333 + 1);
|
||||
final double weightOconner = rmOconner / (1 + changedRepeats / 40);
|
||||
final double newWeight = ((weightWendler + weightOconner) / 2);
|
||||
print(
|
||||
"Initial 1RM: $initialRM repeat: $repeat changedRepeat: $changedRepeats Weight: $weight weightWendler: $weightWendler weight Oconner: $weightOconner. NEW WEIGHT: $newWeight");
|
||||
return newWeight;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user