Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004752opensim[REGION] Script Functionspublic2010-06-04 21:442010-07-09 18:53
ReporterMicheil Merlin 
Assigned Todahlia 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target VersionFixed in Versionmaster (dev code) 
Summary0004752: [PATCH] llVecNorm with a zero vector returns NaN values due to division by zero.
DescriptionThis is a fairly minor issue but it would be cleaner to return zeros instead of NaNs.

Sample script.

default
{
    state_entry()
    {
        llSay(0, "Script running");
    }
    
    touch_start(integer num)
    {
        vector vec = <0.0, 0.0, 0.0>;
        llOwnerSay("Vector " + (string)vec + " Normalized " + (string)llVecNorm(vec));
    }
}

Output:

[21:37] llVecNorm Test: Vector <0.000000,0.000000,0.000000> Normalized <NaN,NaN,NaN>


TagsNo tags attached.
Git Revision or version numberSee SVN Revision
Run ModeStandalone (1 Region)
Physics EngineODE
Environment.NET / Windows64
Mono VersionNone
Viewer
Attached Filespatch file icon llVecNorm.patch [^] (979 bytes) 2010-06-04 21:44 [Show Content]

- Relationships

-  Notes
(0015579)
DoranZemlja (reporter)
2010-06-05 06:29

+1
(0015942)
dahlia (administrator)
2010-07-08 10:13

I made a similar change in a lower level function. Please try git master version * rdf9d4cd9b2c
(0015958)
Micheil Merlin (reporter)
2010-07-09 18:50

llVecNorm now returns a zero vector.
Thanks.

- Issue History
Date Modified Username Field Change
2010-06-04 21:44 Micheil Merlin New Issue
2010-06-04 21:44 Micheil Merlin File Added: llVecNorm.patch
2010-06-04 21:44 Micheil Merlin Git Revision => See SVN Revision
2010-06-04 21:44 Micheil Merlin SVN Revision => 896
2010-06-04 21:44 Micheil Merlin Run Mode => Standalone (1 Region)
2010-06-04 21:44 Micheil Merlin Physics Engine => ODE
2010-06-04 21:44 Micheil Merlin Environment => .NET / Windows64
2010-06-04 21:44 Micheil Merlin Mono Version => None
2010-06-04 21:46 Micheil Merlin Description Updated
2010-06-04 21:47 Micheil Merlin Status new => patch included
2010-06-04 21:57 Micheil Merlin Product Version 0.6.9 => master (dev code)
2010-06-05 06:29 DoranZemlja Note Added: 0015579
2010-06-19 15:56 Micheil Merlin Summary [patch] llVecNorm with a zero vector returns NaN values due to division by zero. => [PATCH] llVecNorm with a zero vector returns NaN values due to division by zero.
2010-07-08 10:13 dahlia Note Added: 0015942
2010-07-08 10:13 dahlia Assigned To => dahlia
2010-07-08 10:13 dahlia Status patch included => patch feedback
2010-07-09 18:50 Micheil Merlin Note Added: 0015958
2010-07-09 18:53 dahlia Status patch feedback => resolved
2010-07-09 18:53 dahlia Fixed in Version => master (dev code)
2010-07-09 18:53 dahlia Resolution open => fixed
2010-07-09 18:53 dahlia Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker