Skip to content

Commit

Permalink
Canvas for a new FixMath paradigm
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcombriat committed Nov 12, 2023
1 parent cf9e173 commit 1833e1e
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions FixMath2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* FixMath2.h
*
* Copyright 2012 Tim Barrass
*
* This file is part of Mozzi.
*
* Mozzi is licensed under a Creative Commons
* Attribution-NonCommercial-ShareAlike 4.0 International License.
*
*/


#ifndef FIXMATH2_H_
#define FIXMATH2_H_

#include "IntegerType.h"

#define SHIFTR(x,bits) (bits > 0 ? (x) >> (bits) : (x) << (-bits)) // shift right for positive shift numbers, and left for negative ones.

template<byte IP, byte FP>
class FixMath2
{
public:

private:
// use of the IntegerType for that?
};







#endif

0 comments on commit 1833e1e

Please sign in to comment.