Skip to content

Commit

Permalink
add deprecated msg
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinSDK committed Oct 11, 2022
1 parent 8bfcdc3 commit bb33edf
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/maze/mz_hex_walls.scad
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use <_impl/_mz_hex_walls.scad>

function mz_hex_walls(cells, rows, columns, cell_radius, left_border = true, bottom_border = true) =
echo("mz_hex_walls is deprecated. use maze/mz_hexwalls instead.")
[
each [for(cell = cells, wall = _build_cell(cell_radius, cell)) wall],

Expand Down
2 changes: 1 addition & 1 deletion src/maze/mz_square_cells.scad
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use <mz_square_initialize.scad>

function mz_square_cells(rows, columns, start = [0, 0], init_cells, x_wrapping = false, y_wrapping = false, seed) =
let(
init_undef = is_undef(init_cells),
init_undef = echo("mz_square_cells is deprecated. use maze/mz_square.") is_undef(init_cells),
mz = init_undef ? mz_square_initialize(rows, columns) : init_cells,
r = len(mz),
c = len(mz[0]),
Expand Down
2 changes: 1 addition & 1 deletion src/maze/mz_square_walls.scad
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use <_impl/_mz_square_walls_impl.scad>

function mz_square_walls(cells, rows, columns, cell_width, left_border = true, bottom_border = true) =
let(
left_walls = left_border ? [for(y = [0:rows - 1]) [[0, cell_width * (y + 1)], [0, cell_width * y]]] : [],
left_walls = echo("mz_square_walls is deprecated. use maze/mz_squarewalls instead.") left_border ? [for(y = [0:rows - 1]) [[0, cell_width * (y + 1)], [0, cell_width * y]]] : [],
buttom_walls = bottom_border ? [for(x = [0:columns - 1]) [[cell_width * x, 0], [cell_width * (x + 1), 0]]] : []
)
concat(
Expand Down
2 changes: 1 addition & 1 deletion src/maze/mz_theta_cells.scad
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use <_impl/_mz_theta_cells.scad>

function mz_theta_cells(rows, beginning_number, start = [0, 0], seed) =
let(
divided_ratio = 1.5,
divided_ratio = echo("mz_theta_cells is deprecated. use maze/mz_theta instead.") 1.5,
before_traveled = config_nbrs(init_theta_maze(rows, beginning_number, divided_ratio)),
s = set_visited(before_traveled[start.x][start.y])
)
Expand Down
2 changes: 1 addition & 1 deletion src/rails2sections.scad
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@

use <matrix/m_transpose.scad>

function rails2sections(rails) = m_transpose(rails);
function rails2sections(rails) = echo("rails2sections is deprecated. use maxtrix/m_transpose instead.") m_transpose(rails);
1 change: 1 addition & 0 deletions src/util/bsearch.scad
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
use <_impl/_bsearch_impl.scad>

function bsearch(sorted, target) =
echo("bsearch is deprecated. use util/binary_search instead.")
is_function(target) ? _bsearch_cmp(sorted, target, 0, len(sorted) - 1) :
_bsearch_vt(sorted, target, 0, len(sorted) - 1); // `sorted` is by zyx
1 change: 1 addition & 0 deletions src/util/has.scad
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
use <bsearch.scad>

function has(lt, elem, sorted = false) =
echo("has is deprecated. use util/contains instead.")
sorted ? bsearch(lt, elem) != -1 :
search([elem], lt) != [[]];
1 change: 1 addition & 0 deletions src/util/sort.scad
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use <_impl/_sort_impl.scad>

function sort(lt, by = "idx", idx = 0) =
echo("sort is deprecated. use util/sorted instead.")
is_function(by) ? _sort_by_cmp(lt, by) : // support function literal
by == "vt" ? _vt_sort(lt) : // for example, sort by zyx for a list of points
_sort_by(lt, by, idx);

1 comment on commit bb33edf

@powerpowerpower
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, teacher

Please sign in to comment.