[Igarden-commit] Garden/source/LayoutDB MaterialRef.cpp, 1.119.2.3, 1.119.2.4
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2006-11-29 12:19:30
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv12715 Modified Files: Tag: Release_branch_v1 MaterialRef.cpp Log Message: Correct NaN returned in initial condition Index: MaterialRef.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/MaterialRef.cpp,v retrieving revision 1.119.2.3 retrieving revision 1.119.2.4 diff -C2 -d -r1.119.2.3 -r1.119.2.4 *** MaterialRef.cpp 15 Nov 2006 12:17:49 -0000 1.119.2.3 --- MaterialRef.cpp 29 Nov 2006 12:19:25 -0000 1.119.2.4 *************** *** 2030,2035 **** { yearOffset = year - EarliestInstanceData()->GetYear(); ! sigmoidDenom = 1 + exp(5-(14*yearOffset/yearsToMaxVal)); ! result = maxVal / sigmoidDenom; } } --- 2030,2042 ---- { yearOffset = year - EarliestInstanceData()->GetYear(); ! if(yearsToMaxVal != 0) ! { ! sigmoidDenom = 1 + exp(5-(14*yearOffset/yearsToMaxVal)); ! result = maxVal / sigmoidDenom; ! } ! else ! { ! result = maxVal; ! } } } |