Opened 8 years ago
Closed 6 years ago
#51 closed defect (fixed)
ModelGeometry: sqrt(negative)
Reported by: | Maciej Komosinski | Owned by: | oriona |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Framsticks core | Version: | |
Keywords: | Cc: |
Description
"sqrt: DOMAIN error" for example:
frams "var m=Model.newFromString(\"//0\np:sh=1,ry=1\n\"); var mg=ModelGeometry.forModel(m); mg.geom_density=2; Simulator.print(mg.sizesAndAxes());" -q
Visual Studio output:
> var m=Model.newFromString("//0\np:sh=1,ry=1\n"); var mg=ModelGeometry.forModel(m); mg.geom_density=2; Simulator.print(mg.sizesAndAxes()); Script.Message: [(2.0,2.0,2.0),Orient@(-0,1,0)]
C++Builder output:
sqrt: DOMAIN error sqrt: DOMAIN error sqrt: DOMAIN error Script.Message: [(2.0,2.0,2.0),Orient@(-0,1,0)]
In:
GeometryUtils::getNextEllipseSegmentationPoint(d, edge.z, edge.x, area.z, area.x);
y = b * sqrt(1.0 - (x*x) / (a*a));
sqrt domain error! sqrt(-0.0998866) because x=0.908248 and a=0.866025
Change History (2)
comment:1 Changed 8 years ago by
Summary: | sqrt(negative) → ModelGeometry: sqrt(negative) |
---|
comment:2 Changed 6 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
In 810: