Copy link to clipboard
Copied
I have this so far:
startT = 0;
endT = 1;
beginVal = 0;
endVal = 3766;
t = linear(time,startT,endT,beginVal,endVal);
t += "";
t.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1 ");
Im getthing this in between the two numbers:
How do I add math.round to this expression to just see nombers without any decimals?
1 Correct answer
I found it a minute later on a video linked below
I just parented slider control to my source text.
num = effect("Slider Control")("Slider").value.toFixed();
function addCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
}
addCommas(num);
https://www.youtube.com/watch?v=EfoHlj0CKes&t=134s
Copy link to clipboard
Copied
I found it a minute later on a video linked below
I just parented slider control to my source text.
num = effect("Slider Control")("Slider").value.toFixed();
function addCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
}
addCommas(num);
https://www.youtube.com/watch?v=EfoHlj0CKes&t=134s

