Skip to content

Instantly share code, notes, and snippets.

View zhelezkov's full-sized avatar

Nick zhelezkov

View GitHub Profile
import ExpoModulesCore
import UIKit
import SwiftUI
// Native view and module definition
public class SwiftuiViewModule: Module {
public func definition() -> ModuleDefinition {
Name("SwiftuiView")
View(SwiftuiView.self) {
// Define your props here
@zhelezkov
zhelezkov / readme.md
Created April 21, 2018 12:08 — forked from xem/readme.md
Maths & trigonometry cheat sheet for 2D & 3D games

Conventions

  • A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
  • lengths are in any unit (ex: pixels)
  • code snippets are in JavaScript

Degrees to radians

angleRad = angleDeg * Math.PI / 180;