mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Additional 3d support
This commit is contained in:
parent
70680fdf39
commit
f26df6c86b
32 changed files with 2370 additions and 165 deletions
|
@ -13,7 +13,7 @@ Vector3::Vector3(float x, float y, float z)
|
|||
|
||||
float Vector3::GetMagnitude() const
|
||||
{
|
||||
return sqrt(mX*mX + mY*mY + mZ*mZ);
|
||||
return sqrtf(mX*mX + mY*mY + mZ*mZ);
|
||||
}
|
||||
|
||||
Vector3 Vector3::Normalize(const Vector3& vec)
|
||||
|
@ -75,4 +75,14 @@ Vector3 Vector3::Transform2(const Vector3& vec, const Quaternion& quat)
|
|||
result.mZ = vec.mZ + z * quat.mW + (quat.mX * y - quat.mY * x);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
Vector4::Vector4(float x, float y, float z, float w)
|
||||
{
|
||||
mX = x;
|
||||
mY = y;
|
||||
mZ = z;
|
||||
mW = w;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue