forked from StrafesNET/strafe-project
impl Into<rbx_types::Vector3> for Vector3
This commit is contained in:
parent
d5854f7e92
commit
cef0ce4c09
@ -7,6 +7,12 @@ impl Vector3{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Into<rbx_types::Vector3> 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{
|
impl mlua::UserData for Vector3{
|
||||||
fn add_fields<'lua,F: mlua::UserDataFields<'lua,Self>>(fields: &mut F) {
|
fn add_fields<'lua,F: mlua::UserDataFields<'lua,Self>>(fields: &mut F) {
|
||||||
fields.add_field_method_get("magnitude",|_,this| Ok(this.0.length()));
|
fields.add_field_method_get("magnitude",|_,this| Ok(this.0.length()));
|
||||||
|
Loading…
Reference in New Issue
Block a user