Recent

Author Topic: Assigning procedure to an image  (Read 52137 times)

arnoldb

  • Jr. Member
  • **
  • Posts: 97
Re: Assigning procedure to an image
« Reply #60 on: July 28, 2009, 10:58:45 am »
Code: [Select]
function DegreeCOS(DegAngle:real):real;
var RadAngle:real;
begin
  RadAngle:=DegAngle/180*pi;
  result:=cos(RadAngle);
end;

Just a note: All trigonometric functions in FPC work in radians by default; if you need the cosine of an angle that is already in radians, then just use cos(x)

Hope this helps, Regards, Arnold
« Last Edit: July 28, 2009, 11:02:40 am by arnoldb »

Waco

  • Jr. Member
  • **
  • Posts: 61
Re: Assigning procedure to an image
« Reply #61 on: July 29, 2009, 10:57:39 pm »
Yep, I discovered that by myself, after some time... And my friend discovered a function named DegToRad, which does pretty much the same. Anyway, thanks for help, but I solved this issue already.

 

TinyPortal © 2005-2018