nl: computes the bounding rectangle for this line segment . the rectangle has a rotation 0 degrees with respect to the coordinate system that the line system is in . for example , if a line segment is 5 unit long and sits at a 37 degree angle from horizontal , the bounding rectangle will have origin of the lower left hand end point of the segment , with width = 4 and height = 3 . concode_field_sep Vector endPoint concode_elem_sep Vector startPoint concode_field_sep Vector getStartPoint concode_elem_sep LineSegment transformBy concode_elem_sep Vector getEndPoint concode_elem_sep float getLength
code: Rectangle2D . Float function ( ) { float loc0 = getStartPoint ( ) . get ( Vector . I1 ) ; float loc1 = getStartPoint ( ) . get ( Vector . I2 ) ; float loc2 = getEndPoint ( ) . get ( Vector . I1 ) ; float loc3 = getEndPoint ( ) . get ( Vector . I2 ) ; return new Rectangle2D . Float ( Math . min ( loc0 , loc2 ) , Math . min ( loc1 , loc3 ) , Math . abs ( loc2 - loc0 ) , Math . abs ( loc3 - loc1 ) ) ; }