Skip to content

Commit

Permalink
fix: test fixes and tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
thestelz committed Oct 26, 2022
1 parent 626bf96 commit 9ed3f12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/rgeo/geographic/projected_window.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def contains_window?(window_)

def scaled_by(x_factor_, y_factor_ = nil)
y_factor_ ||= x_factor_
if x_factor_.to_d != 1 || y_factor_.to_d != 1
if x_factor_ != 1 || y_factor_ != 1
x_, y_ = *center_xy
xr_ = x_span * 0.5 * x_factor_
yr_ = y_span * 0.5 * y_factor_
Expand Down Expand Up @@ -281,7 +281,7 @@ def clamped_by(min_width_, min_height_, max_width_, max_height_)

def with_margin(x_margin_, y_margin_ = nil)
y_margin_ ||= x_margin_
if x_margin_.to_d != 0 || y_margin_.to_d != 0
if x_margin_ != 0 || y_margin_ != 0
ProjectedWindow.new(
@factory,
@x_min - x_margin_,
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ def psych_load(*args)
# @return [string]
#
def format_wkt(wkt)
wkt.gsub(/[[:space:]]+/, " ").gsub(/\(\s/, "(").gsub(/\)\s/, ")").strip
wkt.gsub(/[[:space:]]+/, " ").gsub(/\(\s/, "(").gsub(/\)\s/, ")").gsub(/\s\)/, ")").strip
end

0 comments on commit 9ed3f12

Please sign in to comment.