• ### Similar Content

• By Dohko
Hello All
I'm trying to create a au3 script for get closer one point from another with iterations.
I'm bad at math, and I didn't succeed to create the GetCloser() Func (see below), if anyone have an idea... ^^ Ty
#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <Math.au3> #include <MsgBoxConstants.au3> ;Best geometrical representation :) ;~ | ;~ | ;~ | ;~ *B3 | *B1 ;~ | ;~ | ;~ | ;~ +1 ;~ ----------------------..-1,*A +1,..------------------------- ;~ -1 ;~ | ;~ | ;~ | ;~ *B4 | *B2 ;~ | ;~ | ;~ | Local \$A Local \$B1 Local \$B2 Local \$B3 Local \$B4 \$A = 0 \$A = 0 ;xB > xA & yB > yA (top right corner) \$B1 = 100 \$B1 = 100 ;xB > xA & yB < yA (bottom right corner) \$B2 = 100 \$B2 = -100 ;xB < xA & yB > yA (top left corner) \$B3 = -100 \$B3 = 100 ;xB < xA & yB < yA (bottom right corner) \$B4 = -100 \$B4 = -100 ;Same dist for all B points, its ok Local \$D1 = Distance(\$A,\$B1);141 Local \$D2 = Distance(\$A,\$B2) Local \$D3 = Distance(\$A,\$B3) Local \$D4 = Distance(\$A,\$B4) ;MsgBox(0,"Dist A <-> B1",\$D1) ;MsgBox(0,"Dist A <-> B2",\$D2) ;MsgBox(0,"Dist A <-> B3",\$D3) ;MsgBox(0,"Dist A <-> B4",\$D4) ;get the new \$A pos every (\$D-20) \$step = 20 ;141/6 Then 8 loops ? While \$D1 <> 0 \$A = GetCloser(\$A,\$B1,\$D1,\$step) \$D1 = Distance(\$A,\$B1) MsgBox(0,"NEW POS","A = "&\$A&","&\$A) WEnd MsgBox(0,"Pos A = B","A = "&\$A&","&\$A&" B= "\$B&","\$B) ;B2,B3,B4 loop laters.... Func Distance(\$A,\$B) local \$valeur = ((\$B-\$A)^2) + ((\$B-\$A)^2) \$valeur = Sqrt(\$valeur) \$valeur = Round(\$valeur,0) return \$valeur EndFunc ;Try to understand mathematics... :) ;~ Func Angle(\$A,\$B) ;~ local \$angle = _Degree(ATan((\$B-\$A)/(\$B-\$A))) ;~ return \$angle ;~ EndFunc ;I really dont know how to do this, I find this ;https://www.developpez.net/forums/d830412/general-developpement/algorithme-mathematiques/mathematiques/calcul-rapprocher-point-d/ (souviron34 answer) Func GetCloser(\$A,\$B,\$D,\$step) local \$newPosA ;x \$newPosA = -1;how to calcuate... ACos (or something like this?) ;y \$newPosA = -1;how to calcuate...ASin (or something like this?) ;I need this x/y pos return \$newposA EndFunc
• By MrCheese
hi all,
Dumb question, but say I have a loop:
dim \$i Do     sleep(1000)          if \$i = ; how do i do a function that enters this IF statement every 10 loops?         ; do stuff every 10     EndIf      Until \$i = 100
- what commands in the if statement do I need to use to make it pass, and on every 10th loop, it enters the if statement. ?

Thanks
• By jrsofsd
RunningStats calculates running (moving) statistics: Standard Deviation, Variance, and Mean . The single function _RunningStats(), queries, clears, restores, or adds to the running statistics.
Example.au3 adds 7 samples of data to running statistics and displays the results using _ArrayDisplay().
Example-Persistent-Storage.au3 adds the first 6 samples to the running statistics and stores the results in an INI file. The data is read from the INI file and restored to the running statistics. The 7th sample is added and the results displayed, matching the results from Example.au3.
Credits: John D. Cook for his article "Accurately computing running variance" at http://www.johndcook.com/blog/standard_deviation/
RunningStats.zip

• I started writing this UDF a while ago, so I decided to share it here.
This is an UDF full of advanced mathematical functions. It allows to work with primes, create number sequences, interpolate, calculate values of functions like Riemann zeta.
Full list of functions:

Changelog:

• Hey there
I'm thinking about making a program that will calculate with huge numbers. Well above 1*10^18 probably. Can autoit deal with that? If not, how can I make it work?
Thanks!
×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...