i want to use atan2 function. i'm calling it like this for 30 degree
angle = fix16_atan2(1, sqrt(3))
So angle should have value 34315. But am not getting this value. Pl. help.
Regards,
abhishek
On Fri, Mar 22, 2013 at 1:43 AM, Ben Brewer <flat...@googlemail.com> wrote:
Hey Abhishek,
The fixed functions take radians too so all you need to convert floats to fixes is to use the fix16_to_float function.
The inputs are normalized to the best range for accuracy anyway so any number that can convert to a fix16 losslessly will work fine, that's any number between -32768.0 and 32767.999984741.
Hope that helps,
Ben Brewer (aka Flatmush)
On 21/03/13 05:16, Abhishek Ballaney wrote:
Hi all,
What input range can i give to functions fix16_sin, fix16_cos, fix16_atan2? Give some example to explain. How do i convert my float radian angle to fix16_t data type?
Regards,
abhishek
--
You received this message because you are subscribed to the Google Groups "libfixmath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libfixmath+unsubscribe@googlegroups.com.
To post to this group, send email to libfi...@googlegroups.com.
Visit this group at http://groups.google.com/group/libfixmath?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "libfixmath" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/libfixmath/xBml3Nx0I7o/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to libfixmath+unsubscribe@googlegroups.com.
Hi all,
i want to use atan2 function. i'm calling it like this for 30 degree
angle = fix16_atan2(1, sqrt(3))
So angle should have value 34315. But am not getting this value. Pl. help.
Regards,
abhishek
On Fri, Mar 22, 2013 at 1:43 AM, Ben Brewer <flat...@googlemail.com> wrote:
Hey Abhishek,
The fixed functions take radians too so all you need to convert floats to fixes is to use the fix16_to_float function.
The inputs are normalized to the best range for accuracy anyway so any number that can convert to a fix16 losslessly will work fine, that's any number between -32768.0 and 32767.999984741.
Hope that helps,
Ben Brewer (aka Flatmush)
On 21/03/13 05:16, Abhishek Ballaney wrote:
Hi all,
What input range can i give to functions fix16_sin, fix16_cos, fix16_atan2? Give some example to explain. How do i convert my float radian angle to fix16_t data type?
Regards,
abhishek
--
You received this message because you are subscribed to the Google Groups "libfixmath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libfixmath+...@googlegroups.com.
To post to this group, send email to libfi...@googlegroups.com.
Visit this group at http://groups.google.com/group/libfixmath?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "libfixmath" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/libfixmath/xBml3Nx0I7o/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to libfixmath+...@googlegroups.com.
To post to this group, send email to libfi...@googlegroups.com.
Visit this group at http://groups.google.com/group/libfixmath?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "libfixmath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libfixmath+...@googlegroups.com.