omdl
v0.6.1
OpenSCAD Mechanical Design Library
|
Mathematical base-two bitwise binary functions. More...
#include <../datatypes/datatypes-base.scad>
Go to the source code of this file.
Functions | |
function | bitwise_is_equal (v, b, t=1) |
Test if a base-two bit position of an integer value equals a test bit. More... | |
function | bitwise_i2v (v, w=1, bv=1) |
Encode an integer value as a base-two list of bits. More... | |
function | bitwise_v2i (v) |
Decode a base-two list of bits to an integer value. More... | |
function | bitwise_i2s (v, w=1) |
Encode an integer value as a base-two string of bits. More... | |
function | bitwise_s2i (v) |
Decode a base-two string of bits to an integer value. More... | |
function | bitwise_imi (v, w, s) |
Decode the integer in a value at a shifted base-two bit mask of width-w. More... | |
function | bitwise_and (v1, v2, bv=1) |
Base-two bitwise AND operation for integers. More... | |
function | bitwise_or (v1, v2, bv=1) |
Base-two bitwise OR operation for integers. More... | |
function | bitwise_xor (v1, v2, bv=1) |
Base-two bitwise XOR operation for integers. More... | |
function | bitwise_not (v, w=1, bv=1) |
Base-two bitwise NOT operation for an integer. More... | |
function | bitwise_lsh (v, s=1, bm=1, bv=1) |
Base-two bitwise left-shift operation for an integer. More... | |
function | bitwise_rsh (v, s=1) |
Base-two bitwise right-shift operation for an integer. More... | |
Mathematical base-two bitwise binary functions.
This file is part of omdl, an OpenSCAD mechanical design library.
The omdl is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
The omdl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the omdl; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA; or see http://www.gnu.org/licenses/.
Definition in file math_bitwise.scad.