⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exprtmpl.html

📁 数学表达式计算和解析 用c语言编写的,内含有例.速度较快
💻 HTML
📖 第 1 页 / 共 2 页
字号:
				<td>0</td>
				<td>Returns a number between a up to and including b.</td>
			</tr>
			<tr>
				<td>srand(a)</td>
				<td>1</td>
				<td>1</td>
				<td>0</td>
				<td>0</td>
				<td>Seeds the random number generator with a value.<br>
					Return value is unknown</td>
			</tr>
			<tr>
				<td>randomize()</td>
				<td>0</td>
				<td>0</td>
				<td>0</td>
				<td>0</td>
				<td>Seed the random number generator with a value
					based on the current time.<br>
					Return value is unknown</td>
			</tr>

			<tr>
				<td>deg(a)</td>
				<td>1</td>
				<td>1</td>
				<td>0</td>
				<td>0</td>
				<td>Returns a radians converted to degrees.<br>
					deg(3.14) returns around 179.909</td>
			</tr>
			<tr>
				<td>rad(a)</td>
				<td>1</td>
				<td>1</td>
				<td>0</td>
				<td>0</td>
				<td>Returns a degrees converted to radians.<br>
					rad(180) returns around 3.142</td>
			</tr>
			<tr>
				<td>recttopolr(x,y)</td>
				<td>2</td>
				<td>2</td>
				<td>0</td>
				<td>0</td>
				<td>Returns the polar radius of the rectangular co-ordinates.<br>
					recttopolr(2,3) returns around 3.606</td>
			</tr>
			<tr>
				<td>recttopola(x,y)</td>
				<td>2</td>
				<td>2</td>
				<td>0</td>
				<td>0</td>
				<td>Returns the polar angle (0...2PI) in radians of the rectangular co-ordinates.<br>
					recttopola(2,3) returns around 0.588</td>
			</tr>
			<tr>
				<td>poltorectx(r,a)</td>
				<td>2</td>
				<td>2</td>
				<td>0</td>
				<td>0</td>
				<td>Returns the x rectangular co-ordinate of the polar
					co-ordinates.<br>
					poltorectx(3,1.5) returns around 0.212</td>
			</tr>
			<tr>
				<td>poltorecty(r,a)</td>
				<td>2</td>
				<td>2</td>
				<td>0</td>
				<td>0</td>
				<td>Returns the y rectangular co-ordinate of the polar
					co-ordinates.<br>
					poltorecty(3,1.5) returns around 2.992</td>
			</tr>

			<tr>
				<td>if(c,t,f)</td>
				<td>3</td>
				<td>3</td>
				<td>0</td>
				<td>0</td>
				<td>Evaluates and returns t if c is not 0.0.
				    Else evaluates and returns f.<br>
					if(0.1,2.1,3.9) returns 2.1</td>
			</tr>
			<tr>
				<td>select(c,n,z[,p])</td>
				<td>3</td>
				<td>4</td>
				<td>0</td>
				<td>0</td>
				<td>Returns n if c is less than 0.0.  Returns z
					if c is 0.0.  If c is greater than 0.0 and only
					three arguments were passed, returns z.  If c
					is greater than 0.0 and four arguments were passed,
					return p.<br>
					select(3,1,4,5) returns 5</td>
			</tr>
			<tr>
				<td>equal(a,b)</td>
				<td>2</td>
				<td>2</td>
				<td>0</td>
				<td>0</td>
				<td>Returns 1.0 if a is equal to b. Else returns 0.0<br>
					equal(3,2) returns 0.0</td>
			</tr>
			<tr>
				<td>above(a,b)</td>
				<td>2</td>
				<td>2</td>
				<td>0</td>
				<td>0</td>
				<td>Returns 1.0 if a is above b. Else returns 0.0<br>
					above(3,2) returns 1.0</td>
			</tr>
			<tr>
				<td>below(a,b)</td>
				<td>2</td>
				<td>2</td>
				<td>0</td>
				<td>0</td>
				<td>Returns 1.0 if a is below b. Else returns 0.0<br>
					below(3,2) returns 0.0</td>
			</tr>

			<tr>
				<td>avg(a,...)</td>
				<td>1</td>
				<td>None</td>
				<td>0</td>
				<td>0</td>
				<td>Returns the average of the values passed.<br>
					avg(3,3,6) returns 4</td>
			</tr>
			<tr>
				<td>clip(v,min,max)</td>
				<td>3</td>
				<td>3</td>
				<td>0</td>
				<td>0</td>
				<td>Clips v to the range from min to max.  If v is less
					than min, it returns min.  If v is greater than
					max it returns max. Otherwise it returns v.<br>
					clip(3,1,2) returns 2</td>
			</tr>
			<tr>
				<td>clamp(v,min,max)</td>
				<td>3</td>
				<td>3</td>
				<td>0</td>
				<td>0</td>
				<td>Clamps v to the range from min to max, looping
					if needed.<br>
					clamp(8.2,1.3,4.7) returns 1.4</td>
			</tr>
			<tr>
				<td>pntchange(side1old, side2old, side1new, side2new, oldpnt)</td>
				<td>5</td>
				<td>5</td>
				<td>0</td>
				<td>0</td>
				<td>This is used to translate points from different
					scale.  It works no matter the orientation as long
					as the sides are lined up correctly.<br>
					pntchange(-1,1,0,480,-0.5) returns 120 (x example)<br>
					pntchange(-1,1,480,0,-0.5) returns 360 (y example)</td>
			</tr>
			<tr>
				<td>poly(x,c1,...)</td>
				<td>2</td>
				<td>None</td>
				<td>0</td>
				<td>0</td>
				<td>This function calculates the polynomial.  x is the value
					to use in the polynomial. c1 and on are the coefficients.<br>
					poly(4,6,9,3,1,4) returns 2168<br>
					same as 6*4<sup>4</sup> + 9*4<sup>3</sup> + 3*4<sup>2</sup> + 1*4<sup>1</sup> + 4*4<sup>0</sup></td>
			</tr>

			<tr>
				<td>and(a,b)</td>
				<td>2</td>
				<td>2</td>
				<td>0</td>
				<td>0</td>
				<td>Returns 0.0 if either a or b are 0.0 Else returns 1.0<br>
					and(2.1,0.0) returns 0.0</td>
			</tr>
			<tr>
				<td>or(a,b)</td>
				<td>2</td>
				<td>2</td>
				<td>0</td>
				<td>0</td>
				<td>Returns 0.0 if both a and b are 0.0 Else returns 1.0<br>
					or(2.1,0.0) returns 1.0</td>
			</tr>
			<tr>
				<td>not(a)</td>
				<td>1</td>
				<td>1</td>
				<td>0</td>
				<td>0</td>
				<td>Returns 1.0 if a is 0.0 Else returns 0.0<br>
					not(0.3) returns 0.0</td>
			</tr>
			<tr>
				<td>for(init,test,inc,a1,...)</td>
				<td>4</td>
				<td>None</td>
				<td>0</td>
				<td>0</td>
				<td>This function acts like a for loop in C. First init is
				    evaluated.  Then test is evaluated.  As long as the
					test is not 0.0, the action statements (a1 to an) are
					evaluated, the inc statement is evaluated, and the test
					is evaluated again.  The result is the result of the
					final action statement.<br>
					for(x=0,below(x,11),x=x+1,y=y+x) returns 55.0 (if y was
					initially 0.0)</td>
			</tr>
			<tr>
				<td>many(expr,...)</td>
				<td>1</td>
				<td>None</td>
				<td>0</td>
				<td>0</td>
				<td>This function treats many subexpressions as a single object
					(function). It is mainly for the 'for' function.<br>
					for(many(j=5,k=1),above(j*k,0.001),many(j=j+5,k=k/2),0)</td>
			</tr>


		</table>

	</blockquote>
</div>

<div align="left" class="container">
	<h2><a name="InternalConst">ExprEval Internal Constants</a></h2>
	<blockquote>
		The following constants are provided with ExprEval:
		<table align="center" border="1" width="75%">
			<tr>
				<td align="center"><b>Constant</b></td>
				<td align="center"><b>Math Form</b></td>
				<td align="center"><b>Value</b></td>
			</tr>
			<tr>
				<td>M_E</td>
				<td>e</td>
				<td>2.7182818284590452354</td>
			</tr>
			<tr>
				<td>M_LOG2E</td>
				<td>log<sub>2</sub>(e)</td>
				<td>1.4426950408889634074</td>
			</tr>
			<tr>
				<td>M_LOG10E</td>
				<td>log<sub>10</sub>(e)</td>
				<td>0.43429448190325182765</td>
			</tr>
			<tr>
				<td>M_LN2</td>
				<td>ln(2)</td>
				<td>0.69314718055994530942</td>
			</tr>
			<tr>
				<td>M_LN10</td>
				<td>ln(10)</td>
				<td>2.30258509299404568402</td>
			</tr>
			<tr>
				<td>M_PI</td>
				<td>&#960;</td>
				<td>3.14159265358979323846</td>
			</tr>
			<tr>
				<td>M_PI_2</td>
				<td>&#960;/2</td>
				<td>1.57079632679489661923</td>
			</tr>
			<tr>
				<td>M_PI_4</td>
				<td>&#960;/4</td>
				<td>0.78539816339744830962</td>
			</tr>
			<tr>
				<td>M_1_PI</td>
				<td>1/&#960;</td>
				<td>0.31830988618379067154</td>
			</tr>
			<tr>
				<td>M_2_PI</td>
				<td>2/&#960;</td>
				<td>0.63661977236758134308</td>
			</tr>
			<tr>
				<td>M_1_SQRTPI</td>
				<td>1/&#8730;(&#960;)</td>
				<td>0.56418958354776</td>
			</tr>
			<tr>
				<td>M_2_SQRTPI</td>
				<td>2/&#8730;(&#960;)</td>
				<td>1.12837916709551257390</td>
			</tr>
			<tr>
				<td>M_SQRT2</td>
				<td>&#8730;(2)</td>
				<td>1.41421356237309504880</td>
			</tr>
			<tr>
				<td>M_1_SQRT2</td>
				<td>1/&#8730;(2)</td>
				<td>0.70710678118654752440</td>
			</tr>
		</table>
	</blockquote>
</div>

<div align="left" class="container">
	<h2><a name="AppFunc">Application Internal Functions</a></h2>
	<blockquote>
		Application defined expression functions go here.
		<table align="center" border="1" width="75%">
			<tr>
				<td align="center"><b>Function</b></td>
				<td align="center"><b>Min. Args</b></td>
				<td align="center"><b>Max. Args</b></td>
				<td align="center"><b>Min. Ref Args</b></td>
				<td align="center"><b>Max. Ref Args</b></td>
				<td align="center"><b>Result/Comment</b></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
		</table>
	</blockquote>
</div>

<div align="left" class="container">
	<h2><a name="AppConst">Application Internal Constants</a></h2>
	<blockquote>
		Application defined expression constants go here.
		<table align="center" border="1" width="75%">
			<tr>
				<td align="center"><b>Constant</b></td>
				<td align="center"><b>Math Form</b></td>
				<td align="center"><b>Value</b></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
			</tr>
		</table>
	</blockquote>
</div>

<div align="left" class="container">
	<h2><a name="AppVar">Application Internal Variables</a></h2>
	<blockquote>
		Application defined expression variables go here.
		<table align="center" border="1" width="75%">
			<tr>
				<td align="center"><b>Variable</b></td>
				<td align="center"><b>Math Form</b></td>
				<td align="center"><b>Value</b></td>
			</tr>
			<tr>
				<td></td>
				<td></td>
				<td></td>
			</tr>
		</table>
	</blockquote>
</div>

</body>

</html>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -