Is there a reason why its not in there. Lardmaster told me about the function and it's saved me lol.. He agrees with me in the fact that it should be in there, unless if there is a reason why its not?
Code:
Function FindDTMRotated(DTM:LongInt; var x,y: LongInt; x1,y1,x2,y2: LongInt; StartAngle: Extended; EndAngle: Extened; AngleStep: Extended; var Angle: Extended): Boolean;
The param DTM is obvious (declare which DTM to use).
Var x and y should also be obvious for you (the variables where the coordinates will be stored).
X1,y1,x2,y2 are, probably also obvious to you, the coordinates to look for the DTM in.
The StartAngle param is simply the angle that the DTM starts at (I'd use 0.0).
The EndAngle is the final angle to stop looking for the DTM at (360 degrees = 6.28318530717959, 180 degrees = 3.14159265358979). (this is in radians)
The AngleStep param is how many degrees to go up to search for the rotated DTM each time (ie. AngleStep is .1, it will look at 0.0, then 0.1, then 0.2).
The Angle variable stores the first angle at which the DTM is found.