Javascript function returning number with two decimals...?
Posted
by
muzzledBYbrass
on Stack Overflow
See other posts from Stack Overflow
or by muzzledBYbrass
Published on 2013-07-02T22:53:56Z
Indexed on
2013/07/02
23:05 UTC
Read the original article
Hit count: 182
I have a function to return points along a line and my return comes back with two decimal points...? For example, a return of my variable px will be something like -88.4029.032940598.
vx is the x vector and mult is the distance of the line plus distance to calculate the point. Here is the operation that is returning these values:
var mult = parseFloat(mag + theUnit);
var px = coord_one.x_point + (vx * mult);
console.log(px);
Never have seen this before- I appreciate any and all help!
© Stack Overflow or respective owner