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

AE 2018 Math function

New Here ,
Nov 11, 2017 Nov 11, 2017

Copy link to clipboard

Copied

Hi All,

Appreciate some help for a newbie.

I am using the text slider function on Comp 1.

in the source text I have the expression effect("Slider Control")("Slider").value.toFixed(0,)

this works no problem.

What I am trying to do is have the number displayed only increase in increments of 10. so example if its 15 then its 20 but if its 14 its 10.

I have found many expressions, however I cannot make any work, either I'm using the wrong syntax or the wrong location.

Appreciate if someone can tell me exactly where the expression is put and what it says.

thanks

TOPICS
Expressions

Views

2.2K

Translate

Translate

Report

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 , Nov 12, 2017 Nov 12, 2017

Try it this way (all in the same expression):

s = effect("Slider Control")("Slider").value;

Math.round(s/10)*10

Dan

Votes

Translate

Translate
LEGEND ,
Nov 11, 2017 Nov 11, 2017

Copy link to clipboard

Copied

Easy as pie - divide the number by yor quantization value, round it, multiply it again with your value. Example:

Math.round(Slider/10)*10

Simple 5th grade math.

Mylenium

Votes

Translate

Translate

Report

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
New Here ,
Nov 11, 2017 Nov 11, 2017

Copy link to clipboard

Copied

Thanks Mylenium,

sadly my knowledge of where to put it is lower then 5th grade..

is it

effect("Slider Control")("Slider").value.toFixed(0,);

Math.round(Slider/10)*10

all in the same expression ? this is where I'm having the most difficulty.

thanks

Votes

Translate

Translate

Report

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
Community Expert ,
Nov 12, 2017 Nov 12, 2017

Copy link to clipboard

Copied

Try it this way (all in the same expression):

s = effect("Slider Control")("Slider").value;

Math.round(s/10)*10

Dan

Votes

Translate

Translate

Report

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
New Here ,
Nov 12, 2017 Nov 12, 2017

Copy link to clipboard

Copied

LATEST

Thanks Dan.. works perfect.

Best regards

Votes

Translate

Translate

Report

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