# Negate blueprint macro returns original value

**URL:** <https://forums.unrealengine.com/t/negate-blueprint-macro-returns-original-value/371090>\
**Category:** Blueprint\
**Tags:** unreal-engine, bug-report, UE4, Blueprint, question\
**Created:** [September 20, 2016, 5:35pm UTC](https://forums.unrealengine.com/t/negate-blueprint-macro-returns-original-value/371090 "2016-09-20T17:35:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_6034b9e0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6034b9e0](https://forums.unrealengine.com/u/anonymous_user_6034b9e0)\
**Post date:** [September 20, 2016, 5:35pm UTC](https://forums.unrealengine.com/t/negate-blueprint-macro-returns-original-value/371090/1 "2016-09-20T17:35:30Z")

</div>

The Negate Blueprint macro returns the original unmodified value – this is neither obvious, nor probably what was intended.

This is the body of the negate macro:

![107863-pasted+image+at+2016_09_20+10_30+am.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/c/b/0cbd06819bf4c8b2c273523bbe0e4f98a129afd3.png)

It is evaluating `(Value * -1)`, setting Value (by ref) to `(Value * -1)`, then returning `(Value * -1)` – this is causing the negate to be evaluated twice, so the Result pin will be Value, not `(Value * -1)`

I.e. this is the same as following C++:

```
float Negate(float& Value)
{
    Value = (Value * -1);
    return (Value * -1);
}

```

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [September 21, 2016, 2:47pm UTC](https://forums.unrealengine.com/t/negate-blueprint-macro-returns-original-value/371090/2 "2016-09-21T14:47:50Z")

</div>

Hello,

I have reproduced your issue and have entered a bug report, which you can track here: [Unreal Engine Issues and Bug Tracker (UE-36242)](https://issues.unrealengine.com/issue/UE-36242)

Thank you for your report.

Have a great day
