mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-12-12 18:42:17 -05:00
Update RCL
This commit is contained in:
parent
4fb88d3775
commit
d0b98840c1
11
raycastlib.h
11
raycastlib.h
@ -1731,13 +1731,14 @@ RCL_Unit RCL_perspectiveScaleVertical(RCL_Unit originalSize, RCL_Unit distance)
|
||||
RCL_Unit RCL_perspectiveScaleVerticalInverse(RCL_Unit originalSize,
|
||||
RCL_Unit scaledSize)
|
||||
{
|
||||
// TODO: probably doesn't work
|
||||
if (_RCL_fovCorrectionFactors[1] == 0)
|
||||
_RCL_fovCorrectionFactors[1] = _RCL_fovCorrectionFactor(RCL_VERTICAL_FOV);
|
||||
|
||||
return scaledSize != 0 ?
|
||||
(originalSize * RCL_UNITS_PER_SQUARE + RCL_UNITS_PER_SQUARE / 2) /
|
||||
// ^ take the middle
|
||||
((RCL_VERTICAL_FOV_TAN * 2 * scaledSize) / RCL_UNITS_PER_SQUARE)
|
||||
: RCL_INFINITY;
|
||||
|
||||
((originalSize * RCL_UNITS_PER_SQUARE) /
|
||||
RCL_nonZero((_RCL_fovCorrectionFactors[1] * scaledSize)
|
||||
/ RCL_UNITS_PER_SQUARE)) : RCL_INFINITY;
|
||||
}
|
||||
|
||||
RCL_Unit
|
||||
|
Loading…
Reference in New Issue
Block a user