Post: spinbot
09-19-2018, 07:34 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Love you Smile

Spinbot

//Vector.h
typedef struct
{
*float r, g, b, a;
} Color;
typedef struct Vector2
{
*float x, y;
}Vector2, *PVector2;
typedef struct Vector3
{
*float x, y, z;
*Vector3()
*{
**x = y = z = 0;
*}
*Vector3(float x, float y, float z)
*{
**this->x = x; this->y = y; this->z = z;
*}
*const bool operator== (Vector3 const &Vector)
*{
**return (this->x == Vector.x && this->y == Vector.y && this->z == Vector.z);
*}
*const Vector3& operator+ (Vector3 const &Vector)
*{
**return Vector3(this->x + Vector.x, this->y + Vector.y, this->z + Vector.z);
*}
*const Vector3& operator- (Vector3 const &Vector)
*{
**return Vector3(this->x - Vector.x, this->y - Vector.y, this->z - Vector.z);
*}
*float Distance(Vector3 const &Vector)
*{
**return sqrt(DistanceEx(Vector));
*}
*float DistanceEx(Vector3 const &Vector)
*{
**float _x = this->x - Vector.x, _y = this->y - Vector.y, _z = this->z - Vector.z;
**return ((_x * _x) + (_y * _y) + (_z * _z));
*}
*float DotProduct(Vector3 const &Vector)
*{
**return (this->x * Vector.x) + (this->y * Vector.y) + (this->z * Vector.z);
*}
*const Vector3 &RoundHalfUp()
*{
**return Vector3(floor(this->x + 0.5), floor(this->y + 0.5), floor(this->z + 0.5));
*}
*const Vector3 &RoundHalfDown()
*{
**return Vector3(floor(this->x + 0.5), floor(this->y + 0.5), floor(this->z + 0.5));
*}
} Vector3, *PVector3;
float dx, dy, dz;
float Distance3D(Vector3 c1, Vector3 c2)
{
*float dx = c2.x - c1.x;
*float dy = c2.y - c1.y;
*float dz = c2.z - c1.z;
*return sqrt((float)((dx * dx) + (dy * dy) + (dz * dz)));
}
typedef struct Vector4
{
*float x, y, z, a;
*Vector4()
*{
**x = y = z = a = 0;
*}
*Vector4(float x, float y, float z, float a)
*{
**this->x = x;
**this->y = y;
**this->z = z;
**this->a = a;
*}
} Vector4, *PVector4;
Vector3 vectoangles(Vector3 Angles)
{
*float forward;
*float yaw, pitch;
*float PI = 3.1415926535897931;
*if (Angles.x == 0 && Angles.y == 0)
*{
**yaw = 0;
**if (Angles.z > 0) pitch = 90.00;
**else pitch = 270.00;
*}
*else
*{
**if (Angles.x != -1) yaw = (float)(atan2((double)Angles.y, (double)Angles.x) * 180.00 / PI);
**else if (Angles.y > 0) yaw = 90.00;
**else yaw = 270;
**if (yaw < 0) yaw += 360.00;
**forward = (float)sqrt((double)(Angles.x * Angles.x + Angles.y * Angles.y));
**pitch = (float)(atan2((double)Angles.z, (double)forward) * 180.00 / PI);
**if (pitch < 0) pitch += 360.00;
*}
*Vector3 AnglesVector(-pitch, yaw, 0);
*return AnglesVector;
}
Vector3 Difference1(Vector3 Target, Vector3 Entity)
{
*Vector3 Return;
*Return.x = Target.x - Entity.x;
*Return.y = Target.y - Entity.y;
*Return.z = Target.z - Entity.z;
*return Return;
}
typedef struct vec4_t
{
*float x, y, z, w;
*vec4_t()
*{
**x = y = z = w = 0;
*};
};
char* displayTag = "Head";
(adsbygoogle = window.adsbygoogle || []).push({});

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo