Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to prevent number rounding [0.6 to 1]?

Explorer ,
Jul 06, 2023 Jul 06, 2023

Hi,

 

How can I prevent the numbers effect from rounding numbers like 0.6 to 1? I need it to show value of 1 only when it reaches 1.0 and not before. Currently as soon as the number reaches 0.6 it changes to 1, and since I'm making a sort of slideshow of photos, where I need to show each image in order with the image number above it, it is completely in a desync - since it changes to the next number before the next image shows.

 

Thanks!

TOPICS
How to
869
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 06, 2023 Jul 06, 2023

Add Math.floor() to your Numbers value expression.  

 

This example takes the value of an expression slider on Null 1, then uses Math.floor to round that value down.

 

rawnumber = thisComp.layer("Null 1").effect("Slider Control")("Slider")

Math.floor(rawnumber)

 

Screenshot 2023-07-07 at 5.07.28 pm.png

Translate
Community Expert ,
Jul 06, 2023 Jul 06, 2023

Add Math.floor() to your Numbers value expression.  

 

This example takes the value of an expression slider on Null 1, then uses Math.floor to round that value down.

 

rawnumber = thisComp.layer("Null 1").effect("Slider Control")("Slider")

Math.floor(rawnumber)

 

Screenshot 2023-07-07 at 5.07.28 pm.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 07, 2023 Jul 07, 2023
LATEST

Bless you sir, that has indeed solved it. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 06, 2023 Jul 06, 2023

That behavior is simply built-in. Split the layer and have the lead-in instance's Numbers effect use different settings for decimals.

 

Mylenium

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines