# Multiply by -1 turns positive number into a negative

0 favourites
• 12 posts
From the Asset Store
809 energetic male voice announcer phrases for casual & mobile games, such as puzzles, match, quest, casino, sports etc.
• An incredibly simple trick, but to the maths inept of us, it's very useful, and might not be immediately obvious to someone who wants it (like me!)

``*-1[/code:8y626699]``
• Dividing by zero opens up a portal to another dimension.

Prolly not try that one.

• In order to turn negatives into positives you can use absolute value.

abs(-20)

or

abs(20)

will give 20.

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• In order to turn negatives into positives you can use absolute value.

abs(-20)

or

abs(20)

will give 20.

Can you use abs to turn a positive into a negative?

• No. Abs means Absolute Value. There is no opposite for that, that I am aware of.

Multiplying by -1 seems good for that.

• No. Abs means Absolute Value. There is no opposite for that, that I am aware of.

Multiplying by -1 seems good for that.

That's what I thought, would like to know of any problems that could arise from doing it this way?

• That is the only way

• Can you use abs to turn a positive into a negative?

-abs(x) will always return a negative number.

• > Can you use abs to turn a positive into a negative?

>

-abs(x) will always return a negative number.

Would that be more beneficial than using *-1?

• -1 * -1 will give you 1... while -abs[-1 or 1] always will give you -1

• I saw an add for great abs on youtube. Why is it an Add for Abs?

• Oh wow. That is helpful. I wouldn't have thought of adding a negative to an expression.

-1 * -1 = 1

and

-1 * 1 = -1

Using abs() or -abs() keeps things simple, and adds a small bit of insurance.

I would use abs() or -abs() over *-1.

• 12 posts