question

martin.j avatar image
2 Likes"
martin.j asked Matthew Gillespie answered

Vec3 Constructor with floating point values only on x

When using the Vec3 constructor I have noticed that I cant use floating point values for the x coordinate only. Is this deliberate or am I just doing it wrong?

return Vec3(3.45, 1, 1); returns [3, 1, 1];

However;

returning Vec3(3.45, 1.0, 1.1) returns something like [3.450000,1, 1.100000]

Seems like a small bug. Took me a while to discover that when I wanted a vector of (3.5, 0, 0) I had to write Vec3(3.5, 0.0 , 0.0); or I would get only integer values.

FlexSim 17.1.2
vec3floating pointconstructor
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Marco Baccalaro avatar image Marco Baccalaro commented ·

Seems that when 2 on 3 the numbers are integer also the third is considered in integer and if the 2 on 3 are double also the third is considered double.

0 Likes 0 ·

1 Answer

·
Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered

We're going to remove the integer constructor for the next 17.0 bug fix.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.