has no experience with c++, what's the logic behind the following lines? Thanks!!# Programming - 葵花宝典v*y2008-04-24 07:041 楼
c*s2008-04-24 07:042 楼 double vs = (vp < 4250.0) ?(vp - 1360.0) / 1.16 :785.8 - 1.2344*vp + 794.9 * pow(vp/1000.0,2)- 123.8 * pow(vp/1000.0,3) + 6.4 * pow(vp/1000.0,4);Thanks!!
t*t2008-04-24 07:044 楼就是字面上的意思【在 c*****s 的大作中提到】: double vs = (vp < 4250.0) ?: (vp - 1360.0) / 1.16 :: 785.8 - 1.2344*vp + 794.9 * pow(vp/1000.0,2): - 123.8 * pow(vp/1000.0,3) + 6.4 * pow(vp/1000.0,4);: Thanks!!
P*e2008-04-24 07:046 楼ternary opration啊double vs;if (vp < 4250.0)vs = (vp - 1360.0) / 1.16 ;elsevs = 785.8 - 1.2344*vp + 794.9 * pow(vp/1000.0,2) - 123.8 * pow(vp/1000.0,3) + 6.4 * pow(vp/1000.0,4);【在 c*****s 的大作中提到】: double vs = (vp < 4250.0) ?: (vp - 1360.0) / 1.16 :: 785.8 - 1.2344*vp + 794.9 * pow(vp/1000.0,2): - 123.8 * pow(vp/1000.0,3) + 6.4 * pow(vp/1000.0,4);: Thanks!!