mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-09 06:45:25 -06:00
This commit is contained in:
parent
4250ebf644
commit
e024b08762
3 changed files with 21 additions and 19 deletions
|
@ -112,8 +112,10 @@ void
|
|||
Point::from_SV(SV* point_sv)
|
||||
{
|
||||
AV* point_av = (AV*)SvRV(point_sv);
|
||||
this->x = (long)SvIV(*av_fetch(point_av, 0, 0));
|
||||
this->y = (long)SvIV(*av_fetch(point_av, 1, 0));
|
||||
// get a double from Perl and round it, otherwise
|
||||
// it would get truncated
|
||||
this->x = lrint(SvNV(*av_fetch(point_av, 0, 0)));
|
||||
this->y = lrint(SvNV(*av_fetch(point_av, 1, 0)));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue