Skip to content

Instantly share code, notes, and snippets.

View fabio-t's full-sized avatar

Fabio Ticconi fabio-t

View GitHub Profile
@fabio-t
fabio-t / app.py
Last active April 14, 2018 19:46
Python "GUIzero" test
from guizero import App, PushButton
def button1():
print("b1")
def button2():
print("b2")
def button3():
print("b3")
@fabio-t
fabio-t / rpg_functions.java
Created March 19, 2016 12:44
Diminishing returns formula
public static double diminishing_returns(double val, double scale) {
if(val < 0)
return -diminishing_returns(-val, scale);
double mult = val / scale;
double trinum = (Math.sqrt(8.0 * mult + 1.0) - 1.0) / 2.0;
return trinum * scale;
}