This file contains hidden or 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
/* | |
* An (almost perfect) zoom function that zooms into the mouse cursor pointer. | |
* Assumes that the canvas is full screen - adjusting for this shouldn't be too | |
* tough. | |
* | |
* Attaches a zoom level update function to the mouse wheel event of | |
* the document. Calling this activates zooming via the mouse wheel. | |
* | |
* Assumes that it is part of a class of sorts. | |
* |
This file contains hidden or 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
/****************************************************************************** | |
* CSVWriter | |
****************************************************************************** | |
* Version 0.8 | |
* Author: Starbeamrainbowlabs <feedback at starbeamrainbowlabs dot com> | |
* | |
* An easy way to generate CSV files. Please allow this comment to remain | |
* intact. | |
****************************************************************************** | |
* Changelog |
This file contains hidden or 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
"use strict"; | |
/** | |
* @template https://gist.github.com/sbrl/f8b584a383116b38da29 | |
*/ | |
class Renderer | |
{ | |
constructor(canvas) | |
{ | |
this.canvas = canvas; |
This file contains hidden or 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
"use strict"; | |
/******************************************************************************* | |
**************************** ES6 Smooth Line Class **************************** | |
******************************************************************************* | |
* v0.1 | |
******************************************************************************* | |
* A smooth line class built upon my earlier bezier curve and vector classes. | |
* | |
* Given a number of points (not all of which have to be specified at once), | |
* this class will add the appropriate lineTos to the given drawing context. |
This file contains hidden or 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
/******************************************************************************* | |
******************************* ES6 Range Class ******************************* | |
******************************************************************************* | |
* v0.2 | |
******************************************************************************* | |
* A very simple range class. | |
******************************************************************************* | |
* https://gist.github.com/sbrl/a725e32f14a3e4b94810 | |
* Author: Starbeamrainbowlabs <[email protected]> | |
* |
This file contains hidden or 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
/******************************************************************************* | |
******************************* ES6 Shape Class ******************************* | |
******************************************************************************* | |
* v0.1 | |
******************************************************************************* | |
* A class that draws regular shapes of a given size with an arbitrary number of | |
* sides. Also supports rotation and translation (even after the shape has been | |
* created). | |
* | |
* |
This file contains hidden or 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
/** | |
* Bounded random number generator. Has 3 forms: | |
* | |
** Form 1 ** | |
* @param {number} a The minimum value. | |
* @param {number} b The maximum value. | |
* @param {boolean} c Whether the resulting number should be a float. [optional] | |
* @return {number} A random number. | |
* | |
** Form 2 ** |
This file contains hidden or 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
using System; | |
using System.Net; | |
using System.IO; | |
using System.IO.Compression; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
using System.Diagnostics; | |
using System.Text; | |
using System.Security.Cryptography; | |
using System.Security.Permissions; |
This file contains hidden or 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 <string> | |
#include <iostream> | |
#include "ClassName.h" | |
using namespace std; | |
ClassName::ClassName() | |
{ | |
} |
This file contains hidden or 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
using System; | |
using System.IO; | |
public class Program | |
{ | |
static string filename = "image.ppm"; | |
static int width = 1024; | |
static int height = 1024; |