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
JavaBot
JavaBot•2mo ago
⌛ This post has been reserved for your question.
Hey @Derived Drive! Please use /close or the Close 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.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
JavaBot
JavaBot•2mo ago
Please format your code to make it more readable. For java, it should look like this:
​`​`​`​java
public void foo() {

}
​`​`​`​
​`​`​`​java
public void foo() {

}
​`​`​`​
JavaBot
JavaBot•2mo ago
💤 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.

Did you find this page helpful?