FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

MATHEMATICS

Compare Toolbox Deltapoint versus inline calculation


Anyway why not paste this in and see for yourself...

DIM aPt.4, bPt.4
_numTrials=3000000
WINDOW 1
CALL SETPT(aPt, 100,-1)
CALL SETPT(bPt, 10,100)

now&=FN TICKCOUNT
FOR j&=1 TO _numTrials
  diff&=FN DELTAPOINT(aPt,bPt)
NEXT
now&=FN TICKCOUNT-now&
PRINT FN HIWORD(diff&), FN LOWORD(diff&)
PRINT "FN DELTAPOINT" now&"ticks"

now&=FN TICKCOUNT
FOR j&=1 TO _numTrials
  diffh=aPt.h% -bPt.h%
  diffv= aPt.v% -bPt.v%
NEXT
now&=FN TICKCOUNT-now&
PRINT diffv, diffh
PRINT "direct calc" now&"ticks"

DO: UNTIL FN BUTTON

Robert