Exemplo n.º 1
0
        public Vector2d Sign()
        {
            Vector2d v = this;

            v.x = Mathd.Sign(v.x);
            v.y = Mathd.Sign(v.y);
            return(v);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns a vector with each component set to one or negative one, depending
        /// on the signs of this vector's components, or zero if the component is zero,
        /// by calling <see cref="Mathd.Sign(double)"/> on each component.
        /// </summary>
        /// <returns>A vector with all components as either `1`, `-1`, or `0`.</returns>
        public Vector2d Sign()
        {
            Vector2d v;

            v.x = Mathd.Sign(x);
            v.y = Mathd.Sign(y);
            return(v);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Returns a vector with each component set to one or negative one, depending
        /// on the signs of this vector's components, or zero if the component is zero,
        /// by calling <see cref="Mathd.Sign(double)"/> on each component.
        /// </summary>
        /// <returns>A vector with all components as either `1`, `-1`, or `0`.</returns>
        public Vector3d Sign()
        {
            Vector3d v;

            v.x = Mathd.Sign(x);
            v.y = Mathd.Sign(y);
            v.z = Mathd.Sign(z);
            return(v);
        }
Exemplo n.º 4
0
        public Vector4d Sign()
        {
            Vector4d v = this;

            v.x = Mathd.Sign(v.x);
            v.y = Mathd.Sign(v.y);
            v.z = Mathd.Sign(v.z);
            v.w = Mathd.Sign(v.w);
            return(v);
        }