Clone wiki

Vertesaur / Home

Vertesaur Development Wiki

Environment Setup


Building Vertesaur is as simple as building the primary solution file. NuGet is used to manage any external dependencies and is automatically invoked when a project is first built. Because of the use of NuGet a connection to the NuGet servers is required in order to build the first time. If you must build without the use of NuGet or if a connection is not available you can either manually add required references or remove/unload the test projects.

See also:



  1. Try to make your code look like the existing code.

I usually do most of what ReSharper says and also look to

Floating Point Arithmetic

  1. Allow floating point to do its thing, do not try to fight it!

You will encounter situations with floating point where the arithmetic simply does not add up. You may encounter this with a for loop:

float maxValue = step * iterations;
for(float a = 0; a != maxValue; a += step){
	; // do way too much stuff

You may also encounter this with Vertesaur:

var isecPoint = (Point2)(segmentA.Intersection(segmentB));
// one of these may be false even if the segments intersect

Do not count on the arithmetic working as expected but also do not try to fix the arithmetic. Using an epsilon value is only correct if the value chosen is correct which it won't be for each and every situation. You cannot force it to work so you must instead work with it (do not try to fight it). In the segment example, you must assume that the intersection point is not on both of the segments. Instead of trying to adjust the point so that it would be on both segments, bisect the two segments into four so each pair connects using the point of intersection. Change the problem to better handle the limitations of the result.


See the default home for wiki info: OldHome