Function for Math Library

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
NikitaOdnorob98
User
User
Posts: 74
Joined: Fri Jun 29, 2012 4:50 pm

Function for Math Library

Post by NikitaOdnorob98 »

The cotangent angle (ctg):

Code: Select all

Procedure Ctg(Angle)
  ProcedureReturn Cos(Angle)/Sin(Angle)
EndProcedure
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Function for Math Library

Post by Little John »

Here you are:

Code: Select all

Macro Cot(_x_)
   (1.0/Tan(_x_))
EndMacro
It would not make sense if for of each built-in PB function the reciprocal would also be built into PB.
ehowington
Enthusiast
Enthusiast
Posts: 114
Joined: Sat Sep 12, 2009 3:06 pm

Re: Function for Math Library

Post by ehowington »

Little John wrote: Sun Feb 10, 2013 10:59 am Here you are:

Code: Select all

Macro Cot(_x_)
   (1.0/Tan(_x_))
EndMacro
It would not make sense if for of each built-in PB function the reciprocal would also be built into PB.
++ that It would not make sense if for of each built-in PB function the reciprocal would also be built into PB.
Post Reply