DaY

Forum Replies Created

Viewing 3 posts - 46 through 48 (of 48 total)
  • Author
    Posts
  • in reply to: About branding #5843

    DaY
    Participant

    it could also be an age thing I spend half my life telling my kids to stop being little monkeys and behave and a lot of parents I think do the same, so in our mind we associate monkey with silliness.

    also can you call the sample folder samples it took me 10 mins to find them as it didn’t cross my mind on bananas  LOL

    just that its hard explaining to you friends that I been trying out monkey2 with out them pissing them selves laughing.

    in reply to: About branding #5644

    DaY
    Participant

    I have to agree the name screams out “fun little preteen language” not what we have witch is a cross of Blitzmax and c#.

    could you not just go with BlitzBasic Next or along them lines? Blitz is well known and respected by a lot of coders I think even BlitzBasic 2 or BlitzBasic Pro use the name every one knows and then reach out to the Max/3D/Monkey community maybe then you could have a centralised user base once again.

    Mark you have to many forums and every new one just splits the user base in half every time just seems a waste to not just use Blitzbasic.com.

    in reply to: Monkey2 #5643

    DaY
    Participant

    Thank you for the reply im still trying to figure out using c++ I  import the code and setup the Mx2 class but my class has a union in it is there a mx2 version of union?

     

    [code]

    class vec2
    {
    public:
    union{
    struct{float x, y;};
    struct{float s, t;};
    struct{float r, g;};
    };
    vec2() : x(0.0f), y(0.0f){}
    ~vec2(){}
    vec2(float num) : x(num), y(num){}
    vec2(float x, float y) : x(x), y(y){}
    vec2(const vec2 &u) : x(u.x), y(u.y){}
    vec2& operator = (const vec2 &u){x = u.x; y = u.y; return *this;}
    vec2 operator - (){return vec2(-x, -y);}
    float* operator & (){return (float*)this;};
    vec2& operator += (float num){x += num; y += num; return *this;}
    vec2& operator += (const vec2 &u){x += u.x; y += u.y; return *this;}
    vec2& operator -= (float num){x -= num; y -= num; return *this;}
    vec2& operator -= (const vec2 &u){x -= u.x; y -= u.y; return *this;}
    vec2& operator *= (float num){x *= num; y *= num; return *this;}
    vec2& operator *= (const vec2 &u){x *= u.x; y *= u.y; return *this;}
    vec2& operator /= (float num){x /= num; y /= num; return *this;}
    vec2& operator /= (const vec2 &u){x /= u.x; y /= u.y; return *this;}
    friend vec2 operator + (const vec2 &u, float num){return vec2(u.x + num, u.y + num);}
    friend vec2 operator + (float num, const vec2 &u){return vec2(num + u.x, num + u.y);}
    friend vec2 operator + (const vec2 &u, const vec2 &v){return vec2(u.x + v.x, u.y + v.y);}
    friend vec2 operator - (const vec2 &u, float num){return vec2(u.x - num, u.y - num);}
    friend vec2 operator - (float num, const vec2 &u){return vec2(num - u.x, num - u.y);}
    friend vec2 operator - (const vec2 &u, const vec2 &v){return vec2(u.x - v.x, u.y - v.y);}
    friend vec2 operator * (const vec2 &u, float num){return vec2(u.x * num, u.y * num);}
    friend vec2 operator * (float num, const vec2 &u){return vec2(num * u.x, num * u.y);}
    friend vec2 operator * (const vec2 &u, const vec2 &v){return vec2(u.x * v.x, u.y * v.y);}
    friend vec2 operator / (const vec2 &u, float num){return vec2(u.x / num, u.y / num);}
    friend vec2 operator / (float num, const vec2 &u){return vec2(num / u.x, num / u.y);}
    friend vec2 operator / (const vec2 &u, const vec2 &v){return vec2(u.x / v.x, u.y / v.y);}
    };
    float dot(const vec2 &u, const vec2 &v);
    float length(const vec2 &u);
    float length2(const vec2 &u);
    vec2 mix(const vec2 &u, const vec2 &v, float a);
    vec2 normalize(const vec2 &u);
    vec2 reflect(const vec2 &i, const vec2 &n);
    vec2 refract(const vec2 &i, const vec2 &n, float eta);
    vec2 rotate(const vec2 &u, float angle);

    [/code]

    it shouldn’t be that hard but I seem to be dim today!

Viewing 3 posts - 46 through 48 (of 48 total)