is there a difference between float ant TPrecision ?
in what case should I use one or the other ?
thanx !
TPrecision vs float
http://oli-lab.org
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces
follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social
-
sm_jamieson
- Member
- Posts: 551
- Contact:
The sdk file "UsineDefinitions.h" contains the line:
typedef float TPrecision;
So they are the same thing.
I suppose the point about using TPrecision, is that in theory it could change - but its very unlikely. I must admit I just use float in my user module code.
I know there was a discussion on the forums about using "double" for increased precision and/or range or numbers supported. The conclusion was that "double" increased the storage and processing requirements too much.
typedef float TPrecision;
So they are the same thing.
I suppose the point about using TPrecision, is that in theory it could change - but its very unlikely. I must admit I just use float in my user module code.
I know there was a discussion on the forums about using "double" for increased precision and/or range or numbers supported. The conclusion was that "double" increased the storage and processing requirements too much.
-
sm_jamieson
- Member
- Posts: 551
- Contact:
NOTE: there is similar situation with bool and LongBool. In that case they are not the same thing though, and the SDK always uses LongBool. User module code can still use bool for its own use of course.
The SDK definition is:
//-----------------------------------------------------------------------------
/// Custom bool type to match the 4 bytes DELPHI LongBool type.
typedef int LongBool;
The SDK definition is:
//-----------------------------------------------------------------------------
/// Custom bool type to match the 4 bytes DELPHI LongBool type.
typedef int LongBool;
Who is online
Users browsing this forum: No registered users and 4 guests
