transform.position inconsistent numbers problem

Couldn’t find answer anywhere. I have such script:

if (transform.position.x == 0 {
    //aint workin
}
if (transform.position.x == desiredPosition.x) { //desired.x is 0.0 aswell
    //aint work in as wale
}

And it doesn’t work, even though it should. When I try to Debug.Log transform.position it gives out “(0.0, y, z)”, which is normal. But whenever I do transform.position.x it gives out weird numbers like “2.328306E-10” even though it is at 0.0x.

I am using CharacterController.Move to move my character from point to point. Sometimes other locations bug like this aswell, but it is usually 0.0x. I know 100% that the transform is exactly at the desired location, and transform.position is there to back me up on this, but .x still prints out weird. Any way around this? Can I force move my transform to 0.0x somehow? Any help is appreciated, thanks in advance!

EDIT: I know that float numbers can weird out when you’re doing calculations with them wrong, can this be the case here? The Vectors I use to .Move my charController are working and giving out proper values.

Simply “2.328306E-10” is a very tiny number which equal 0.0000000002328, it seems like a kind of float numbers wired behaviors, and it is very common when working with UI where you do not get 0.0 but a number like that, so do not take care of it, Go Forward.