It is against the law, That is what Jesus was saying the law goes deeper than actions, it goes to the very thoughts. but Gods Grace changes even our thoughts.
Pro 16:3 Commit thy works unto the LORD, and thy thoughts shall be established.
2Co 10:4 (For the weapons of our warfare are not carnal, but mighty through God to the pulling down of strong holds
2Co 10:5 Casting down imaginations, and every high thing that exalteth itself against the knowledge of God, and bringing into captivity every thought to the obedience of Christ;
Praise God.