Max/M4L first java test
Hi guys, I duno if u can help me out, since this in Max environment, which may be specifics, but this fcnt should give value 4.3 but gives nan.
This part of tuts, so I continue in that, but I already smth missing so would like to figure it out.
var mySketch = new JitterObject("jit.gl.sketch", "ecoSys");
function Vector(x, y, z) {
this.x = x;
this.y = y;
this.z = z;
this.add = function(s) {
this.x += s.x;
this.y += s.y;
this.z += s.z;
}
this.mult = function(s) {
this.x = s.x;
this.y= s.y;
this.z *= s.z;
}
this.sub = function(s) {
this.x -= s.x;
this.y -= s.y;
this.z -= s.z;
}
this.div = function(s) {
this.x /= s.x;
this.y /= s.y;
this.z /= s.z;
}
}
var myVec = new Vector(0.3, 0.4, 0.7);
myVec.add(4);
post(myVec.x);
3 Replies
⌛
This post has been reserved for your question.
Hey @Derived Drive! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
Please format your code to make it more readable. For java, it should look like this:
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.