Skip to content

Instantly share code, notes, and snippets.

View saaresto's full-sized avatar
💭
🐼

Ilya Issakin saaresto

💭
🐼
View GitHub Profile
@saaresto
saaresto / main.go
Created October 26, 2018 09:01
Calculate square root using Newton's law (https://tour.golang.org/flowcontrol/8)
package main
import (
"fmt"
"math"
)
const DELTA = 0.000000000000000000000000000001
func sqrt(x float64) (z float64) {
@saaresto
saaresto / Overlapper.groovy
Last active January 26, 2016 18:31
Needed to get proper ranges overlap checker for further use in Java. Decided to have some fun and use enum with groovy closures as values.
import groovy.transform.CompileStatic
import groovy.transform.TupleConstructor
/**
* User: iissakin
* Date: 26.01.2016.
*/
@CompileStatic
class Overlapper {