I want to have a point that belongs or not to a straight line dependanding on a boolean value. I tried
(4.54, -1.82) a + (1 - a) Point(f)
in the definition of my point, where (4.54, -1.82) is the curent random position, a the boolean name, f the straight line. But it does not work.
Any other idea ?
you must know that a boolean is not 0
or 1
, it's take true
or false
,
so create an integer called n
and write this : n=if(a,1,0)
then u can complete ur work as
(4.54, -1.82) n + (1 - n) Point(f)
otherwise i don't know