omdl
v0.5
OpenSCAD Mechanical Design Library
|
Mathematical bitwise binary (base-two) functions. More...
#include <primitives.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 vector of bits. More... | |
function | bitwise_v2i (v) |
Decode a base-two vector 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_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 bitwise binary (base-two) 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.