windjammer 0.48.0

A simple language inspired by Go, Ruby, and Elixir that transpiles to Rust - 80% of Rust's power with 20% of the complexity
Documentation
// This file simulates collision2d.wj
// It imports both RigidBody2D and Collider2D from the same module

use module_import_resolution::RigidBody2D
use module_import_resolution::Collider2D

pub fn test_collision(a: RigidBody2D, b: RigidBody2D) -> bool {
    match a.collider {
        Collider2D::Box { width: w1, height: h1 } => {
            match b.collider {
                Collider2D::Box { width: w2, height: h2 } => {
                    w1 == w2 && h1 == h2
                }
                Collider2D::Circle { radius: _ } => false,
            }
        }
        Collider2D::Circle { radius: r1 } => {
            match b.collider {
                Collider2D::Box { width: _, height: _ } => false,
                Collider2D::Circle { radius: r2 } => r1 == r2,
            }
        }
    }
}