Expand description
Generic traits for geometric operations
Traitsยง
- Contain
- The
trait Contain<T>defines a methodcontainsthat checks if an object of typeTis contained within another object. Thecontainsmethod takes a reference to another object of typeTas a parameter and returns a boolean value indicating whether the object is contained within the other object or not. This trait can be implemented for any type that needs to support thecontainsfunctionality. - Displacement
- The
Displacementtrait defines a way to displace a value of typeTby another value of typeT. - MinDist
- Defines a trait for calculating the minimum distance between two values of type
T. - Overlap
- The
trait Overlap<T>defines a methodoverlapsthat checks if two objects of typeToverlap with each other. Theoverlapsmethod takes a reference to another object of typeTas a parameter and returns a boolean value indicating whether the two objects overlap or not. This trait can be implemented for any type that needs to support theoverlapsfunctionality.