static GLOBAL_VAR: i32 = 42;
fn add(a: i32, b: i32) -> i32 {
a + b
}
struct Point {
x: i32,
y: i32,
}
impl Rectangle {
fn area(&self) -> u32 {
self.width * self.height
}
fn square(size: u32) -> Rectangle {
Rectangle {
width: size,
height: size,
}
}
}
const PI: f64 = 3.14;