Case law is very rarely discrete; the point of case law is that the law is not and should not be mechanically applied.
Case law arises from the chancery courts of England, where the primary goal of the court was to do what was "fair", rather than simply what the law said.