float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
return mix(rand(fl), rand(fl + 1.0), fc);
}
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// g++ test.cpp --std=c++11 -lpthread -O2 | |
//#ifdef WIN32 <- stdafx breaks this ifdef... | |
//#include "stdafx.h" | |
//#endif | |
#include <iostream> | |
#include <atomic> | |
#include <thread> | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(SolutionDir)Intermediate\Build\Win64\UE4Editor\Inc\$(SolutionName);$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AIModule;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AITestSuite;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AnalyticsVisualEditing;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AnimationCore;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AnimGraphRuntime;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AssetRegistry;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AudioMixer;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AudioPlatformConfiguration;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AugmentedReality;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\Inc\AutomationController;$(MSBuildStartupDirectory)\..\..\Intermediate\Build\Win64\UE4Editor\In |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdbool.h> | |
#include <spu_intrinsics.h> | |
// shuffle helpers | |
#define L0 0x00010203 | |
#define L1 0x04050607 | |
#define L2 0x08090a0b | |
#define L3 0x0c0d0e0f | |
#define R0 0x10111213 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <gdiplus.h> | |
LRESULT CALLBACK WindowProcessMessages(HWND hwnd, UINT msg, WPARAM param, LPARAM lparam); | |
void draw(HDC hdc); | |
int WINAPI WinMain(HINSTANCE currentInstance, HINSTANCE previousInstance, PSTR cmdLine, INT cmdCount) { | |
// Initialize GDI+ | |
Gdiplus::GdiplusStartupInput gdiplusStartupInput; | |
ULONG_PTR gdiplusToken; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The following code is based on the paper "Dancing Links" by D. E. Knuth. | |
//See http://www-cs-faculty.stanford.edu/~uno/papers/dancing-color.ps.gz | |
#ifndef DLX_H | |
#define DLX_H | |
#include <cstring> | |
#include <climits> | |
struct data_object //A module in the sparse matrix data structure. | |
{ | |
data_object* L; //Link to next object left. | |
data_object* R; // " right. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <memory> | |
#include <vector> | |
#include <algorithm> | |
#include <type_traits> | |
template< class ... > using void_t = void; | |
template< class T , class = void > | |
struct is_dereferenceable : std::false_type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------------------------------------------------------------- | |
// Filename: astar.h | |
// Version: 1.24 | |
// Date: 2002/03/08 | |
// Purpose: Provide template for a* algorythm | |
// (c) T.Frogley 1999-2002 | |
// ------------------------------------------------------------------------- | |
#ifndef ASTAR_H | |
#define ASTAR_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2015 Plausible Labs Cooperative, Inc. | |
* All rights reserved. | |
*/ | |
#pragma once | |
#include <functional> | |
#include <type_traits> | |
#include <limits> |