Commit graph

220 commits

Author SHA1 Message Date
Revar Desmera
48d30fc686 Reorganize math.scad 2020-01-08 20:43:19 -08:00
Adrian Mariano
29b682be96 Added lcm() and gcd() and is_integer() to math.scad. Added a couple
3d examples for supershape() that I snagged from
list-comprehension-demo.  Added repeat_entries to array.scad.  Note
dependence on _sum_preserving_round which is in paths.scad.  Also note
it's possible _force_list (added to math.scad) should be exposed, or
placed elsewhere.
2019-12-06 19:27:49 -05:00
Revar Desmera
9f92fe8775 Enhanced lerp() to allow list/range u values to return lists of results. 2019-11-18 21:11:38 -08:00
Revar Desmera
5cca83958f gaussian_rand() -> gaussian_rands(), log_rand() -> log_rands() 2019-11-06 22:19:19 -08:00
Revar Desmera
50acb3c0b0 Various bugfixes, optimizations, and docs improvements found via regressions. 2019-10-25 15:16:48 -07:00
Revar Desmera
bbabc641da Removed redundant vquant*() functions. Improved docs." 2019-10-22 17:09:08 -07:00
Revar Desmera
a85ea4ecc9 Added modang() to standardize angles to <-180,180> 2019-09-23 16:38:07 -07:00
Revar Desmera
ccfed6b306 Fixed a typo in det2() docs. 2019-09-19 02:42:42 -07:00
Revar Desmera
e4ecb21217 quant\*() now work on vectors and pointlists. 2019-08-24 11:51:24 -07:00
Revar Desmera
aa8a084d62 Added log2() and cumsum() 2019-08-06 17:12:28 -07:00
Revar Desmera
e8300c5bb6 Fixed indexing of rand_int() 2019-07-18 21:58:41 -07:00
Revar Desmera
56b41b487b Improved compare_vals() and compare_lists() for heterogenous types. 2019-06-24 15:31:59 -07:00
Adrian Mariano
49365add3c Added faster and simpler versions of max_index and min_index. 2019-06-23 13:17:04 -04:00
Revar Desmera
62f913a148 Added rand_ints() and shuffle() 2019-05-29 17:42:09 -07:00
Revar Desmera
aadd189c97 Added det2(), det3(), and determinant() 2019-05-27 17:50:04 -07:00
Revar Desmera
4fb825ce14 Bugfix for deltas() 2019-05-26 23:30:44 -07:00
Revar Desmera
11e5406951 Fixed product() for matrices. 2019-05-12 13:41:26 -07:00
Revar Desmera
ba9b7c5b3b Added product() 2019-05-12 13:32:34 -07:00
Revar Desmera
e946031d99 Added deltas() 2019-05-10 03:00:41 -07:00
Revar Desmera
414f06df86 Fixed scalar approx() 2019-05-04 20:19:35 -07:00
Revar Desmera
55ff7f3a93 Added sqr() and approx() 2019-05-04 20:10:23 -07:00
Revar Desmera
c79e887612 Removed per-file copyright messages in favor of the LICENSE file. 2019-05-03 12:30:20 -07:00
Revar Desmera
cc36235736 Updated copyright years. Split math.scad up. Enabled attach for lots of shapes. Removed backwards compatability. 2019-04-19 17:02:17 -07:00
Revar Desmera
019aae4347 Brought args for rotate_points3d in line with rot() and rotate(). 2019-04-19 11:36:38 -07:00
Revar Desmera
1d6aefc867 Removed all uses and incudes. Document all includes needed for each file. Added std.scad include. 2019-04-19 00:25:10 -07:00
Revar Desmera
a46ea27fca Changed all BOSL references to BOSL2. 2019-04-18 23:45:46 -07:00
Revar Desmera
6b0e796462 Renamed all V_ constants. Removed ALIGN_ constants. 2019-04-18 23:32:17 -07:00
Revar Desmera
08711565e7 Removed deprecations. 2019-04-18 21:16:10 -07:00
Revar Desmera
96739c3ea0 Added convex_hull() 2019-04-16 15:34:54 -07:00
Revar Desmera
fde93d9991 Added PHI constant. 2019-04-12 00:08:56 -07:00
Revar Desmera
54d6ca2bd0 Added gaussian_rand() and log_rand(). 2019-04-10 15:53:40 -07:00
Revar Desmera
b7e3644df3 Fixed compare_vals for lists with single lists. 2019-04-08 20:51:29 -07:00
Revar Desmera
a84dec40fc Fixed rotate_points3d() and vector_axis() for un-normalized co-axial vectors. 2019-04-08 18:49:34 -07:00
Revar Desmera
670c47ca86 Added enumerate() and sortidx() 2019-04-04 20:27:01 -07:00
Revar Desmera
843268e9b8 Fixes for bugs found my math test suite. 2019-04-04 00:37:21 -07:00
Revar Desmera
e435660f11 Fixed recursive comparison of lists. 2019-04-03 13:54:48 -07:00
Revar Desmera
cc37b39344 Added matrix_transpose() 2019-04-02 19:07:13 -07:00
Revar Desmera
6f99eb7925 Fix dropped section header. 2019-04-01 23:44:12 -07:00
Revar Desmera
229b9e1e3c Optimizations to compare_vals() 2019-04-01 23:40:15 -07:00
Revar Desmera
a4c4738f80 Fixed rotate_points3d(from,to) 2019-04-01 18:55:48 -07:00
Revar Desmera
d1a9d98033 Made rotate_points3d() accept axis or from/to args. 2019-03-31 18:43:54 -07:00
Revar Desmera
282207701a Added replist() 2019-03-31 04:06:51 -07:00
Revar Desmera
f3c6fbc593 Commented out top-level variables in math.scad, due to pathological OpenSCAD behavious. 2019-03-31 03:21:07 -07:00
Revar Desmera
d7320b7c0a More select and posmod optimizations. 2019-03-31 00:03:02 -07:00
Revar Desmera
015c34d637 Large optimization to select() 2019-03-30 22:39:44 -07:00
Revar Desmera
f7b79029fa Improved new list_range() 2019-03-29 00:11:46 -07:00
Revar Desmera
ea6df0b816 Added list_range() 2019-03-28 22:25:33 -07:00
Revar Desmera
326dbd47d8 Renamed array_sort() to sort(), added count_true(), simplified any() and all() 2019-03-28 17:46:35 -07:00
Revar Desmera
6f5a990124 Added array_unique(). Renamed quicksort() to array_sort() 2019-03-28 02:55:15 -07:00
Revar Desmera
cdd2989215 Added compare_lists(), compare_vals(), and quicksort() 2019-03-28 02:26:16 -07:00
Revar Desmera
29736a7748 Added array_dim() 2019-03-27 01:59:22 -07:00
Revar Desmera
ad01203a7a Typo fixes. 2019-03-25 04:20:09 -07:00
Revar Desmera
228f4c4134 vector3d_angle -> vector_angle 2019-03-25 03:52:09 -07:00
Revar Desmera
f074c63cf2 Fixing docs for hyperbolic functions. 2019-03-25 03:02:24 -07:00
Revar Desmera
3abf9fa868 Changed any() and all() to test nested lists, and enabled shortcutting via binary recursion. 2019-03-25 02:53:49 -07:00
Revar Desmera
67144218f4 Renamed wrap_range() to select(), and fixed array_zip() 2019-03-25 01:42:08 -07:00
Revar Desmera
9a3c25d3d3 Massive reworking of documentation production. 2019-03-22 21:13:18 -07:00
Revar Desmera
fd2347dc19 Rewrote cyl() to avoid minkowski, and allow use of both fillet and chamfer on opposite ends of the same cylinder. 2019-03-02 11:14:36 -08:00
Revar Desmera
e4837a0b21 Added useful functions for argument handling. 2019-02-27 03:51:19 -08:00
Revar Desmera
fc2a1f5f6d Improved tube(), added cube2pt() 2019-02-24 04:35:40 -08:00
Revar Desmera
86f9c2ead9 Added vmul() 2019-02-11 18:47:07 -08:00
Revar Desmera
54af28d8c4 Added several coordinate system conversion functions. 2019-02-04 19:18:08 -08:00
Revar Desmera
74702b5863 Fixed wrap_range negative index wrapping. 2019-02-04 04:22:36 -08:00
Revar Desmera
f64e16298d Changed lerp() formula to be less susceptible to FP rounding errors. 2018-11-25 15:22:58 -08:00
Revar Desmera
81210a2a95 Added functions to translate, scale, and rotate arrays of 3d points. 2018-11-25 12:49:44 -08:00
Revar Desmera
924392fe79 PI is a thing that exists in OpenSCAD, dangit. 2018-10-09 20:50:27 -07:00
Revar Desmera
924a35188c Fixed crazy FP rounding error in vector3d_angle() 2018-10-09 15:34:26 -07:00
Revar Desmera
844d2101e5 Added triangulation support code. 2018-09-01 02:38:47 -07:00
Revar Desmera
2d9fa565b3 Updated bezier code to support N-point beziers. 2018-02-16 14:49:32 -08:00
Revar Desmera
b3f19b1407 Initial code dump. 2017-08-29 17:00:16 -07:00