- Home /

# Separately compare coordinate values of vectors

Hi all. I'm little confused with Untiy vectors math. Let's say I performed few Vector rotations, finding intersections and so on to find vertices of rectangle. After these calculations performed I have two Vector2 with x value which practicially the same but slightly different: 42.0 (original value) and 41.9999962 (value affected by vector operations). How can I make my script to understand they are the same? I know that comparing with == resolves this problem for Vector2 and Vector3 types but what if I want to compare individual coordinates in the same way? Does Unity have something built-in for this problem or I should take care of this myself, for example with something like this:

```
bool isTheSame = Mathf.Abs(v1.x-v2.x) < 0.001;
```

Thanks in advance.

### Your answer

### Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.

### Follow this Question

### Related Questions

Vector3 == comparison efficiency and float precision 5 Answers

Check/compare array elements 1 Answer

How do I find a String in an Array? 2 Answers