There can be restrictive clauses if you rent, lease and sometimes even own property preventing you from keeping certain animals, or placing conditions on them, but these are individual.
Presuming these don't apply then the answer is none, you can quite legally keep a pig in your house !
So no distance is legally required between pigs or yours or anyone else's house.
However you can be done for nuisance if they smell or are noisy, but your neighbours would need to demonstrate that this was happening.