Skip to content

Instantly share code, notes, and snippets.

View lambert's full-sized avatar

Lambert lambert

  • home
  • the Netherlands
View GitHub Profile
@lambert
lambert / Q_rsqrt.c
Last active December 18, 2023 20:54
#include <stdint.h>
float Q_rsqrt (float number)
{
const float x2 = number * 0.5F;
const float threehalfs = 1.5F;
union {
float f;
uint32_t i;
} conv = { .f = number };
@lambert
lambert / encoder.c
Last active October 18, 2021 19:10
8051 Encoder
/*!
* \file encoder.c
*
* Date: 22/01/2019
*/
#include <stdio.h>
#include <8052.h>