Skip to content

Instantly share code, notes, and snippets.

@vmichalak
vmichalak / Random.kt
Created January 4, 2018 09:59
Kotlin Random
import kotlin.math.floor
/**
* This class implement a Linear Congruential Generator.
*
* @author Valentin Michalak
*/
class Random(private var seed: Long = 0) {
companion object {
@nickbutcher
nickbutcher / MainActivity.kt
Last active February 22, 2024 21:17
Demonstrating how to tile a (Vector) Drawable
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY