From cef0ce4c09e14a00c1e8349e44b314f96a388a68 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 18 Sep 2024 18:47:55 -0700 Subject: [PATCH] impl Into for Vector3 --- src/runner/vector3.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/runner/vector3.rs b/src/runner/vector3.rs index 8c8cb9a..7fd6753 100644 --- a/src/runner/vector3.rs +++ b/src/runner/vector3.rs @@ -7,6 +7,12 @@ impl Vector3{ } } +impl Into for Vector3{ + fn into(self)->rbx_types::Vector3{ + rbx_types::Vector3::new(self.0.x,self.0.y,self.0.z) + } +} + impl mlua::UserData for Vector3{ fn add_fields<'lua,F: mlua::UserDataFields<'lua,Self>>(fields: &mut F) { fields.add_field_method_get("magnitude",|_,this| Ok(this.0.length()));