Hi Jethro,

I'm a bit perplexed by your suggestion, as:

0.25 == 0.5 squared.

Having the 0.5 multiplication within the brackets would force the operation
to work on a temporary vec3 rather than a singe float so would take three
times as much computation.

Robert.

On 4 February 2015 at 00:15, Jethro Leevers <j.leev...@aamgroup.com> wrote:

> Hi,
>
> Looking in the osg\BoundingBox template it seems to have a function
> radius2, this function seems to return 1/4 of the diameter squared, is
> there a reason for this?
>
> Code:
>
> return 0.25*((_max-_min).length2());
>
>
>
> I thought the following would be a more accurate radius2 function
>
> Code:
>
> return ((_max-_min)*0.5).length2();
>
>
>
>
> Thank you!
>
> Cheers,
> Jethro[/code]
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=62584#62584
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to