simulatorone wrote:CicTec wrote:simulatorone wrote:PD: Existe algun comando que retorne los angulos negativos a positivos?
- Code: Select all
angle = -45000;
var1 = angle; // -45000;
var2 = abs(angle); // 45000;
U____U¿¿¿ perdon.... asido una pregunta muy tonta,![]()
![]()
Nada tranquilo

simulatorone wrote:CicTec wrote:simulatorone wrote:o cuando si el angulo es igual a 450 que me devueba 90.
Explicame eso please, un ejemplo practico escrito en posible codigo Gemix de como podria ser.
PD: aun el editor no lo he podido probar, por cuestion de encentrarme en los ultimos detalles de la beta que va a salir pronto, despues lo mirare con calma asi vamos a ver que tal y las posibles sugerencias
Si seria un comando asi:
angulo_anitguo=450000;
Angulo_nuevo=warpvalue(angulo_antiguo);
Angulo_nuevo >> es igual a 90000;
Te pego la descripcion segun DarkBasicPRO:(esta en ingles U_U)
----------------------------------------------------------------------
WRAPVALUE
This command will return a value that does not exceed the range of 0 to 360.
Syntax
Return Float=WRAPVALUE(Angle Value)
Parameters
Angle Value
Float
Specify the angle value in degrees between 0 and 360.
Returns
This value is a float number such as 0.5
Description
Where a value is specified that exceeds this range, the command will wrap the value around to bring it
back within the range. This command is best understood by using the number of a clock as a mental
picture of how a number wraps. If the clock hand points to 11 and is then advanced 2 hours, the number
has to wrap from 12 around to 1 to keep the cycle going. The parameter should be specified using a real
number.
Example Code
DO
A=WRAPVALUE(A+1)
PRINT A
LOOP
mmm ok, la anoto a ver que puedo añadir mas adelante, gracias por la sugerencia
