Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing vector methods #228

Merged
merged 15 commits into from
Jul 21, 2024
Prev Previous commit
Next Next commit
Add Vector3:Abs()
  • Loading branch information
ZachCurtis committed Jul 16, 2024
commit 4d44b34865b141a955df2d9ac66a21c4621fddd5
1 change: 1 addition & 0 deletions crates/lune-roblox/src/datatypes/types/vector3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ impl LuaUserData for Vector3 {
methods.add_method("Min", |_, this, rhs: LuaUserDataRef<Vector3>| {
Ok(Vector3(this.0.min(rhs.0)))
});
methods.add_method("Abs", |_, this, ()| Ok(Vector3(this.0.abs())));
// Metamethods
methods.add_meta_method(LuaMetaMethod::Eq, userdata_impl_eq);
methods.add_meta_method(LuaMetaMethod::ToString, userdata_impl_to_string);
Expand Down