Add near API function.

Call near function from equals function.

Ref #21.
Add support for testing difference in alpha.

Simplify error check.
Merge pull request #22 from TheMasster12/master

Add near API function.