Skip to content

Instantly share code, notes, and snippets.

View Magoninho's full-sized avatar
:octocat:
studying

João Felipe Ribeiro Magoninho

:octocat:
studying
View GitHub Profile
@Magoninho
Magoninho / PerlinNoise.py
Created November 29, 2020 12:47 — forked from veb/PerlinNoise.py
Perlin like noise with Python and pygame
import pygame
import math
def findnoise2(x,y):
n = int(x) + int(y) * 57
allf = 0xFFFFFFFF
an = (n << 13) & allf
n = (an ^ n) & allf
nn = (n*(n*n*60493+19990303)+1376312589)&0x7fffffff
return 1.0-(float(nn)/1073741824.0);
@Magoninho
Magoninho / tasks.json
Last active November 12, 2020 00:58
Makes Visual Studio Code run C++ code immediately
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "Build and run",
"command": "g++ -g ${file} -o ${fileDirname}/${fileBasenameNoExtension} && ${fileDirname}/${fileBasenameNoExtension}",
"options": {
"cwd": "${workspaceFolder}"
},