MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / main

Function main

02_ecosystem/geo/examples/demo.rs:3–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1use geo::{Area, Circle, Perimeter, Square};
2
3fn main() {
4 let c = Circle {
5 x: 0.0,
6 y: 1.0,
7 radius: 3.0,
8 };
9 let s = Square {
10 x: 0.0,
11 y: 1.0,
12 sidelen: 2.0,
13 };
14 println!("The circles area is: {}", c.area());
15 println!("The circles perimeter is: {}", c.circumference());
16 println!("The squares area is: {}", s.area());
17}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected