示例#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);
        }