Skip to content

I need to divide an integer written in a field by an integer constant. How to do it? #468

Answered by kajr0s
kajr0s asked this question in Q&A
Discussion options

You must be logged in to vote

const deltaXdiv2 = Math.trunc(deltaX / 2);
const deltaYdiv2 = Math.trunc(deltaY / 2);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kajr0s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant