Faithlife.Math provides platform-independent types for representing points, rectangles and sizes, and methods for operating on those types.
Faithlife.Math should be installed via NuGet.