Instantly share code, notes, and snippets.

View CentripetalCatmullRom.cpp
#include <cmath>
#include <iostream>
#include <utility>
#include <SFML/Graphics.hpp>
// https://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/23980479#23980479
View uniform_int_distribution_fast.hpp
// Moved to repo https://github.com/degski/uniform_int_distribution_fast
View invertible_hash_functions.hpp
// MIT License
//
// Copyright (c) 2018 degski
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
View statistics.hpp
// MIT License
//
// Copyright (c) 2018 degski
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
View lehmer.hpp
#ifndef LEHMER_HPP_INCLUDED
#define LEHMER_HPP_INCLUDED 1
/*
* A C++ implementation of fast, 128-bit, Lehmer-style PRNGs
*
* The MIT License (MIT)
*
* Copyright (c) 2018 Melissa E. O'Neill
* Copyright (c) 2018 degski
View shift_rotate_avx2.cpp
// MIT License
//
// Copyright (c) 2018 degski
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
View seed_seq_fe.hpp
/* boost random/seed_seq_fe.hpp header file
*
* Copyright Melissa E. O'Neill 2015
* Copyright degski 2017
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* See http://www.boost.org for most recent version including documentation.
*
View main.cpp
// compiler (in VC) with /std:c++latest
template<typename value_type>
struct constexpr_bug {
using size_type = std::size_t;
using pointer = value_type * ;
static constexpr bool svo ( ) noexcept {
return ( ( sizeof ( large_s ) - std::size_t { 1 } ) / sizeof ( value_type ) );
}
View gist:18b983d5153b85004eb28c9d8fd409fa
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <SFML/Graphics.hpp>
#include <ciso646>