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
int[][] result; | |
float t, c; | |
public float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
public float ease(float p, float g) { | |
if (p < 0.5f) | |
return 0.5f * pow(2*p, g); |
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
// note : if you're on github gist and want to copy paste this code, you can click on the "Raw" button | |
// and then do Ctrl A, Ctrl C, Ctrl V | |
// (code below by Kurt Spencer, slightly modified code to run as Processing tab) | |
// maybe you should rather use this new (improved) version of the noise instead : https://github.com/KdotJPG/OpenSimplex2 | |
/* | |
* OpenSimplex Noise in Java. | |
* by Kurt Spencer | |
* | |
* v1.1 (October 5, 2014) |
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 Object | |
// | |
// GenerateMe submission to MCCC Sep 2016 | |
// generateme.blog@gmail.com | |
// http://generateme.tumblr.com/ | |
// http://folds2d.tumblr.com/ | |
void setup() { | |
size(540, 540); |
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
PShape sierp, lightShape; | |
Col[] cols; | |
float cubeRot, cubeSize; | |
float isoAngle; | |
int lights; | |
LightInfo[] lightlist; | |
public void setup() { | |
size(500, 500, P3D); | |
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
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param {number} r The red color value | |
* @param {number} g The green color value | |
* @param {number} b The blue color value | |
* @return {array} The HSL representation |
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
package com.example.chapter7.traits | |
class DecoratorTraits | |
abstract class Check { | |
def check():String ="Checked application details" | |
} | |
trait employmentCheck extends Check { | |
override def check():String="Checked employment details " +super.check() |