Function Cosine($numValue)
$sc = CreateObject("ScriptControl")
$sc.Language = "jscript"
$result = $sc.Eval("Math.cos("+$numValue+")")
$sc = 0
$Cosine = $result
EndFunction
Test examples...
$testvalue = 45
$test = Cosine($testvalue)
? "cosine of $testvalue is: "+$test
Function Ceiling($numValue)
ReplyDelete$sc = CreateObject("ScriptControl")
$sc.Language = "jscript"
$result = $sc.Eval("Math.ceil("+$numValue+")")
$sc = 0
$Ceiling = $result
EndFunction
? "ceiling of 26.6 is: "+Ceiling(26.6)