Skip to content

Instantly share code, notes, and snippets.

@hesiod
hesiod / clothoid.py
Created February 13, 2020 20:52
Track Transition Curve Experiment (Clothoid/Arc/Clothoid transition)
#!/usr/bin/env python3
import numpy as np
import scipy.special as sc
import matplotlib.pyplot as plt
import matplotlib.widgets as wi
# Resolution
COUNT = 100
@hesiod
hesiod / enum_class_bitfield.hpp
Last active April 28, 2017 19:52
Make C++11 (and later) scoped enums (enum classes) behave like bitfields
/* Make C++11 (and later) scoped enums (enum classes) behave like bitfields, i.e. allow bitwise OR/AND (&/|)
*
* Based on and expanded from:
* https://softwareengineering.stackexchange.com/questions/194412/using-scoped-enums-for-bit-flags-in-c/204566#204566
*
* For the legally inclined:
* LICENSE: Software Engineering SE answers are CC BY-SA 2.5, so my modifications are CC BY-SA 2.5 as well
*/
#include <type_traits>