Is there a way to do sin, cos, and tan in Jack?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a way to do sin, cos, and tan in Jack?

A_Random_Person
Is there a way to compute sine, cosine and tangent in Jack? I'm trying to make a 3D engine.
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to do sin, cos, and tan in Jack?

WBahn
Administrator
This post was updated on .
You would need to add those functions to the Math library.

There are a number of ways to implement these functions. One method that you might explore is using the CORDIC algorithms, which is how scientific calculators used to compute these and other functions when they had resource-starved processors.

One problem you are going to have is that the existing language definition only supports integer data types, so you will need to either develop a protocol that accommodates that or implement either a fixed or floating point data type and extend the language to support it.
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to do sin, cos, and tan in Jack?

ivant
Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to do sin, cos, and tan in Jack?

WBahn
Administrator
Why am I not surprised? He did some really amazing work with this stuff.

I'm going to make a point of NOT looking further into this -- I can't afford the time sink right now and I just know I would get sucked in real fast.