I hereby claim:
- I am sefufuller on github.
- I am sefu (https://keybase.io/sefu) on keybase.
- I have a public key whose fingerprint is 5054 184E 42ED 3231 ECB5 4A4A B7DF 76AD 5A3F B9EA
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
areaTriangleTrig a b c = c * height / 2 -- use trigonometry | |
where | |
cosa = (b ^ 2 + c ^ 2 - a ^ 2) / (2 * b * c) | |
sina = sqrt (1 - cosa ^ 2) | |
height = b * sina | |
areaTriangleHeron a b c = result -- use Heron's formula | |
where | |
result = sqrt (s * (s - a) * (s - b) * (s - c)) | |
s = (a + b + c) / 2 |
-- Type annotation (optional) | |
fib :: Int -> Integer | |
-- With self-referencing data | |
fib n = fibs !! n | |
where fibs = 0 : scanl (+) 1 fibs | |
-- 0,1,1,2,3,5,... | |
-- Same, coded directly | |
fib n = fibs !! n |
play{SinOsc.ar(OnePole.ar(Mix( | |
LFSaw.ar([1,0.99],[0,0.6],2000,2000).trunc([400,600])*[1,-1] | |
),0.98)).dup*0.1} |