-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
3,152 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
z3-solver | ||
more-itertools | ||
numpy | ||
sympy | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
pub trait BoolOptionOps { | ||
fn then_some_unit(self) -> Option<()>; | ||
fn then_none(self) -> Option<()>; | ||
} | ||
|
||
impl BoolOptionOps for bool { | ||
fn then_some_unit(self) -> Option<()> { | ||
if self { Some(()) } else { None } | ||
} | ||
|
||
fn then_none(self) -> Option<()> { | ||
if self { None } else { Some(()) } | ||
} | ||
} | ||
|
||
pub trait BoolResultOps { | ||
#[expect(clippy::missing_errors_doc)] | ||
fn then_ok_unit<E, FE>(self, error: FE) -> Result<(), E> | ||
where | ||
FE: FnOnce() -> E; | ||
|
||
#[expect(clippy::missing_errors_doc)] | ||
fn then_err_unit<E, FE>(self, error: FE) -> Result<(), E> | ||
where | ||
FE: FnOnce() -> E; | ||
} | ||
|
||
impl BoolResultOps for bool { | ||
fn then_ok_unit<E, FE>(self, error: FE) -> Result<(), E> | ||
where | ||
FE: FnOnce() -> E, | ||
{ | ||
if self { Ok(()) } else { Err(error()) } | ||
} | ||
|
||
fn then_err_unit<E, FE>(self, error: FE) -> Result<(), E> | ||
where | ||
FE: FnOnce() -> E, | ||
{ | ||
if self { Err(error()) } else { Ok(()) } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#![feature(step_trait)] | ||
|
||
pub mod area2d; | ||
pub mod bool_ops; | ||
pub mod circular; | ||
pub mod coords2d; | ||
pub mod coords3d; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
noop | ||
Button A: X+94, Y+34 | ||
Button B: X+22, Y+67 | ||
Prize: X=8400, Y=5400 | ||
|
||
Button A: X+26, Y+66 | ||
Button B: X+67, Y+21 | ||
Prize: X=12748, Y=12176 | ||
|
||
Button A: X+17, Y+86 | ||
Button B: X+84, Y+37 | ||
Prize: X=7870, Y=6450 | ||
|
||
Button A: X+69, Y+23 | ||
Button B: X+27, Y+71 | ||
Prize: X=18641, Y=10279 |
Oops, something went wrong.