LCOV - code coverage report
Current view: top level - maps/random/rmgen/placer/noncentered - RectPlacer.js (source / functions) Coverage Total Hit
Test: lcov.info Lines: 100.0 % 8 8
Test Date: 2026-11-22 03:02:19 Functions: 100.0 % 3 3

            Line data    Source code
       1              : /**
       2              :  * The RectPlacer returns all tiles between the two given points that meet the Constraint.
       3              :  */
       4              : function RectPlacer(start, end, failFraction = Infinity)
       5              : {
       6            3 :         this.bounds = getBoundingBox([start, end]);
       7            3 :         this.bounds.min.floor();
       8            3 :         this.bounds.max.floor();
       9            3 :         this.failFraction = failFraction;
      10              : }
      11              : 
      12            7 : RectPlacer.prototype.place = function(constraint)
      13              : {
      14            3 :         const bboxPoints = getPointsInBoundingBox(this.bounds);
      15           67 :         const points = bboxPoints.filter(point => g_Map.inMapBounds(point) && constraint.allows(point));
      16            3 :         return (bboxPoints.length - points.length) / bboxPoints.length <= this.failFraction ? points : undefined;
      17              : };
        

Generated by: LCOV version 2.0-1