Advanced Calculation using round()
-
Hi,
i am trying to do a calculation using round and this is the formula i need to do:
add L and R = 6.5+6.0 = 12.5 /2 = 6.25
Now subtract – 0.5 for all ‘other’ countries = 5.75
Now round up to 6.0at moment i have: round(((%listening%+%reading%)/2)*2) /2
and the php version i ccreated which works is this to give you an idea ??
Just to give you an example:
<?php
$listening = 6.5;
$reading = 7;
$writingadd = $listening + $reading;
$writingdiv = $writingadd / 2;
$writingmin = $writingdiv – 0.8;
$writing = round($writingmin * 2) / 2;
$speaking = $listening;
$totaladd = $listening + $reading + $writing + $speaking;
$totaldiv = $totaladd / 4;
$totalround = round($totaldiv * 2) / 2;
//echo ‘<br>Est. Overall: ‘ . $totalround;
$tround = 7.0;
$gap = $tround – $totalround;
?>but trying to do it in Caldera Forms, as it be better ??
- The topic ‘Advanced Calculation using round()’ is closed to new replies.