Hello.
I want to know how i can max a calculation to a certain value. In this case its about daysCal it should when it gets down to a negative number go back to 112 and continue the calculation from there. I hope someone can help.
var dpC:DataProvider=new DataProvider()
var weeksCal = Number
var yearsCal = Number
var daysCal= Number
daysCal= (Math.floor (days-weeksCount*7))
yearsCal=yearsSb.value
weeksCal=weeksNo-weeksCount
dpC.addItem({"Weeks Training": weeksCal})
dpC.addItem({"Seasons Training":(weeksCal)/16})
dpC.addItem({"Age Training": Math.floor ((weeksCal)/16+yearsCal)+"y"+(daysCal+"d")})
dgC.dataProvider=dpC