Jump to content
  1. Danyfirex

    Danyfirex

  • 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[2] Local $B1[2] Local $B2[2] Local $B3[2] Local $B4[2] $A[0] = 0 $A[1] = 0 ;xB > xA & yB > yA (top right corner) $B1[0] = 100 $B1[1] = 100 ;xB > xA & yB < yA (bottom right corner) $B2[0] = 100 $B2[1] = -100 ;xB < xA & yB > yA (top left corner) $B3[0] = -100 $B3[1] = 100 ;xB < xA & yB < yA (bottom right corner) $B4[0] = -100 $B4[1] = -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[0]&","&$A[1]) WEnd MsgBox(0,"Pos A = B","A = "&$A[0]&","&$A[1]&" B= "$B[0]&","$B[1]) ;B2,B3,B4 loop laters.... Func Distance($A,$B) local $valeur = (($B[0]-$A[0])^2) + (($B[1]-$A[1])^2) $valeur = Sqrt($valeur) $valeur = Round($valeur,0) return $valeur EndFunc ;Try to understand mathematics... :) ;~ Func Angle($A,$B) ;~ local $angle = _Degree(ATan(($B[1]-$A[1])/($B[0]-$A[0]))) ;~ 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[2] ;x $newPosA[0] = -1;how to calcuate... ACos (or something like this?) ;y $newPosA[1] = -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
    • By scintilla4evr
      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:
      Download
    • By Katie_Deely
      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!
×
×
  • Create New...