mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-16 13:50:05 +01:00
add deprecated msg
This commit is contained in:
parent
8bfcdc39a9
commit
bb33edfd75
@ -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],
|
||||
|
||||
|
@ -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]),
|
||||
|
@ -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(
|
||||
|
@ -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])
|
||||
)
|
||||
|
@ -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);
|
@ -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
|
@ -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) != [[]];
|
@ -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);
|
Loading…
x
Reference in New Issue
Block a user