Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
Pages: 1
hello everyone
I am having a problem with two floats, neither of which is equal to 0.0, being multiplied and resulting in 0.0...
let _fooS strcatn "derived r from getmyhexcoordinates is: ":: (itoa r)::nil-> string in// this shows -derived r from getmyhexcoordinates is: -100 in log
let sqrt (3.0) *. (itof r) -> squaretimesr in
let _fooS strcatn "square root of 3 times r is: " :: (ftoa squaretimesr)::nil -> string in // this shows "square root of 3 times r is: 0.000000" in the log
I also tried putting the 3.0 outside of parenthesis to the same result
let _fooS strcatn "derived r from getmyhexcoordinates is: ":: (itoa r)::nil-> string in// this shows -derived r from getmyhexcoordinates is: -100 in log
let sqrt 3.0 *. (itof r) -> squaretimesr in
let _fooS strcatn "square root of 3 times r is: " :: (ftoa squaretimesr)::nil -> string in // this shows "square root of 3 times r is: 0.000000" in the log
any guidance welcome!
-Dan
Offline
let's say i have a function that once in a while makes a variable , say, x, = 0, how do I handle things so it doesn't get calculated and crash the vm?
thanks!
-Dan
Last edited by hebdemnobad (8-Oct-2024 02:17:07)
Offline
Hello hexa numbers can be converted into integer using htoi https://www.openspace3d.com/scoldoc/htoi.html
let _fooS strcatn "derived r from getmyhexcoordinates is: ":: (itoa htoi r)::nil-> string in// this shows -derived r from getmyhexcoordinates is: -100 in log
let sqrt (3.0 *. (itof htoi r)) -> squaretimesr in
let _fooS strcatn "square root of 3 times r is: " :: (ftoa squaretimesr)::nil -> string in // this shows "square root of 3 times r is: 0.000000" in the log
Offline
Hello hexa numbers can be converted into integer using htoi https://www.openspace3d.com/scoldoc/htoi.html
let _fooS strcatn "derived r from getmyhexcoordinates is: ":: (itoa htoi r)::nil-> string in// this shows -derived r from getmyhexcoordinates is: -100 in log let sqrt (3.0 *. (itof htoi r)) -> squaretimesr in let _fooS strcatn "square root of 3 times r is: " :: (ftoa squaretimesr)::nil -> string in // this shows "square root of 3 times r is: 0.000000" in the log
The qrs coordinate numbers are integers...or are you saying that scol can convert qrs coordinates in 3 axis space to xy coordinates in 2 axis space?
Offline
if this is intergers just remove htoi
yes you can concert 3D coords into 2D coords with projection functions, but I miss some infos to understand the purpose of the code
Offline
if this is intergers just remove htoi
yes you can concert 3D coords into 2D coords with projection functions, but I miss some infos to understand the purpose of the code
thanks I will play around with that although as per my other thread i've figured out how to translate three axis coordinates of the system...
Offline
Pages: 1