ABOUT CALCULATION - Biorhythms
HI EVERYONE,,
this is my function and i will state the problem at the bottom..
Code:
//calculate the physical cycle which has physical curve 23 days
double physicalCycle(Date& dob, Date& currentDate)
{
double score;
double distance = distanceFromDobAndCurrentDate(dob, currentDate);
score = 100 * sin(360*(distance/23));
return score;
//check - the answer should be 63.10879473
}
when i entered
dob: 1 1 1969
current date: 1 6 2004
the output of the physical cycle should be 63.10879473 but it is wrongly output which is -80.---
can someone tell me wat is the problem, is it the formula or..?
this is the website u can calculate the physical cycle http://www.orcapia.com/froggy/biorhy...&detl=1&save=1