I have two Vector3, that each represent the size of an area. First one is the total amount of the area. Second one is just a part of the first one. How do i get the percentage, that remains of the total area, when i subtract the smaller area?
If both represents size (they are positive in components by definition) and fully interesects (one fully lies in borders of another), then you just need to calculate percentage of their volume difference:
|v1.volume - v2.volume|/max(v1.volume, v2.volume)
So in code it will look like this:
double v1Volume = v1.x * v1.y * v1.z;
double v2Volume = v2.x * v2.y * v2.z;
double percentageDiff = 100 * Math.Abs(v1Volume - v2Volume) / Math.Max(v1Volume, v2Volume);
This way, it doesn't even matter which one small and which one big, just put both in this function and it will show correct answer.