Skip to content

Instantly share code, notes, and snippets.

View harrisonweinerman's full-sized avatar

Harrison Weinerman harrisonweinerman

View GitHub Profile
@harrisonweinerman
harrisonweinerman / Harrison Weinerman
Last active August 29, 2015 14:21
Swift Riemann Sum Calculator
//This code works fine in a Swift playground.
let startingX = 0.0
let finishingX = 2.0
//make this smaller for more accuracy but slower calculation times
let increment = 0.1
var area = 0.0
func fOfX(x : Double) -> Double{
//
// Calc IA
//
// Harrison Weinerman
//
// Spring 2016
//
// NOTE: Implicit differentiation support isn't complete. Does not yet implement product rule so be wary of differentiating unseparable equations beyond the first derivative. Also, evaluating derivatives at a point currerntly plugs in the same value for all variables.
//
@harrisonweinerman
harrisonweinerman / ConfettiView.swift
Last active September 15, 2017 03:16
I wrote this library to create the raining Monkey emoji effect when you first download Monkey-- view it in action here! https://www.dropbox.com/s/ue90xef6dd9wb8w/monkeyconfetti.gif?dl=0 Copyright Monkey Squad Inc. and reproduced here with permission. Please attribute Monkey Squad Inc. if referencing.
//
// ConfettiView.swift
// Monkey
//
// Created by Harrison Weinerman on 3/25/17.
// Copyright © 2017 Monkey Squad, Inc. All rights reserved.
//
import UIKit
import CoreMotion
/**