[JIRA] Commented: (SVC-5028) New comparison operator: approximatly equals =~

Strife Onizuka (JIRA) no-reply at lindenlab.cascadeo.com
Fri Nov 13 20:04:01 PST 2009


    [ http://jira.secondlife.com/browse/SVC-5028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=146561#action_146561 ] 

Strife Onizuka commented on SVC-5028:
-------------------------------------

How about:
{code}
integer llAngleApproxEquals(rotation a, rotation b, float radian_deviation)
{
    return llAngleBetween(a, b) < radian_deviation;
}

integer llPosApproxEquals(vector a, vector b, float distance)
{
    return llVecDist(a,b) < distance;
}
{code}

> New comparison operator: approximatly equals =~ 
> ------------------------------------------------
>
>                 Key: SVC-5028
>                 URL: http://jira.secondlife.com/browse/SVC-5028
>             Project: 2. Second Life Service - SVC
>          Issue Type: New Feature
>          Components: Scripts
>            Reporter: TigroSpottystripes Katsu
>
> if two floats are equal within precision error, this operator will return TRUE, also works for comparing vectors and rotations (and any other data type that might become avaiable that contains floats)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.secondlife.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the Jira-notify mailing list