예제 #1
0
        public static SVector3 operator +(SVector3 lhs, SVector3 rhs)
        {
            SVector3 sVector = new SVector3
            {
                x = lhs.x,
                y = lhs.y,
                z = lhs.z
            };

            sVector.x += rhs.x;
            sVector.y += rhs.y;
            sVector.z += rhs.z;
            return(sVector);
        }
예제 #2
0
        public static SVector3 operator *(SVector3 lhs, float rhs)
        {
            SVector3 sVector = new SVector3
            {
                x = lhs.x,
                y = lhs.y,
                z = lhs.z
            };

            sVector.x *= rhs;
            sVector.y *= rhs;
            sVector.z *= rhs;
            return(sVector);
        }
예제 #3
0
        public override bool Equals(object obj)
        {
            SVector3 sVector = obj as SVector3;

            return(sVector != null && sVector.x == this.x && sVector.y == this.y && sVector.z == this.z);
        }