Get the integer value from real one Unity pro

Muhammed Adel

Member
Join Date
Oct 2018
Location
Cairo
Posts
1
Hi everyone :*

I am using using unity pro v.13 i want to do the mathematical function of floor() which makes for example 1.2 to 1 and makes 2.9 to 2. How can i do this is there a block for this function?


Thank you:book:
 
I'm not familiar with what mathematical floor is but if it's as simple as your example and you don't need the part after the decimal then REAL_TRUNC_INT will do what you need
 
The Block to use is Real_Trunc_Int
It Converts a real to integer and truncates it in the direction of zero. If you dont want in in that direction then you must write some custome FB

real_trunc_int.JPG
 

Similar Topics

The analog array has 16 individual bits and each bit is an alarm. SCADA is having issues getting the BIT bool value. However they can get the...
Replies
9
Views
978
Hello, I need a little help. I’m looking for a way to program integer values to activate a bit for an alarm. for example... If any Integer[0] thru...
Replies
41
Views
7,817
Have beginner knowledge of digital controls, and intermediate/advanced knowledge of socket clients and listeners (written logging proxies, socket...
Replies
9
Views
3,703
Hi, Can someone help me explain in detail this integer Value. N7[4+((N151_0 AND -16)/16)].[N151_0 AND 15] Based on my understanding in the...
Replies
6
Views
2,578
Hello everyone, Does anyone know how can I display the integer value(which is equivalent of seconds) into time format hh:mm:ss in Centum VP...
Replies
0
Views
1,525
Back
Top Bottom