SCI Kernel Documentation/Arithmetic Functions: Difference between revisions

From Sierra Wiki
Jump to navigationJump to search
Andrew Branscom (talk | contribs)
 
Andrew Branscom (talk | contribs)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:SCI Pages]]
[[Official SCI Documentation]]<br />
[[Official SCI Documentation]]<br />
 
[[SCI Kernel Documentation|Table of Contents]]
&nbsp;
<div align="center">
<div align="center">
Chapter:  
Chapter:  
Line 21: Line 23:
[[SCI Kernel Documentation/Debugging Functions|17]] |  
[[SCI Kernel Documentation/Debugging Functions|17]] |  
[[SCI Kernel Documentation/Index|Index]]
[[SCI Kernel Documentation/Index|Index]]
</div><br />
</div>
 
<div align="center"><span style="font-size: 22pt">Arithmetic Functions</span><br />''Author: [[Jeff Stephenson]] &nbsp; 1988-04-04''<br />''Revision by: [[David Slayback]] &nbsp; 1989-07-25''</div></div>
<div align="center"><span style="font-size: 22pt">Arithmetic Functions</span><br />
''Author: [[Jeff Stephenson]]''<br />
''Revision by: David Slayback''</div>
 
&nbsp;


<br />
==<br /> Arithmetic Functions ==
==<br /> Arithmetic Functions ==


Line 85: Line 83:
</blockquote>
</blockquote>


&nbsp;
==<br /> References ==
 
<references /><!-- Do not edit this section. It is autopopulated by <ref></ref> tags -->


;Notes
==<br /> Also See ==
<references />


* [[:Category: Documentation| Documentation]]
* [[:Category: Official Documentation| Official Documentation]]
* [[:Category: Kernel Functions| Kernel Functions]]
&nbsp;
&nbsp;


[[SCI Kernel Documentation | Table of Contents]]
[[Official SCI Documentation]]<br />
 
[[SCI Kernel Documentation|Table of Contents]]
&nbsp;


<span style="float: left">[[SCI Kernel Documentation/Sound Functions|&lt; Previous: Sound Functions]]</span>
<span style="float: left">[[SCI Kernel Documentation/Sound Functions|&lt; Previous: Sound Functions]]</span>
<span style="float: right">[[SCI Kernel Documentation/File Functions|Next: File Functions &gt;]]</span>
<span style="float: right">[[SCI Kernel Documentation/File Functions|Next: File Functions &gt;]]</span>
&nbsp;
&nbsp;
 
[[Category:References]]
[[Category:Historical Pages]]
[[Category:Development]]
[[Category:Documentation]]
[[Category:Documentation]]
[[Category:SCI Documentation]]
[[Category:Official Documentation]]
[[Category:SCI Kernel Functions]]
[[Category:Technical Info]]
[[Category:Kernel Functions]]
[[Category:SCI Arithmetic Functions]]
[[Category:SCI Arithmetic Functions]]

Latest revision as of 20:24, 25 December 2025

Official SCI Documentation
Table of Contents  

Chapter: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Index

Arithmetic Functions
Author: Jeff Stephenson   1988-04-04
Revision by: David Slayback   1989-07-25



Arithmetic Functions


(Random min max)

Returns a random number n such that 0 < min <= n <= max.


(Abs number)

Returns the absolute value of the signed integer number.


(Sqrt number)

Returns the square root of number, which is assumed to be unsigned.


(GetDistance x1 y1 x2 y2 [perspective])

Returns the distance between the two points determined by (x1, y1) and (x2, y2). perspective is the users point of view of the room in degrees away from the vertical along the y axis, which makes each y-pixel represent a greater distance than an x-pixel.


(GetAngle x1 y1 x2 y2)

Returns the angle between the two points determined by (x1, y1) and (x2, y2). The angle is measured in degrees and is between 0 and 359 degrees.


(SinMult angle num)

Returns num multiplied by the sine of angle.


(CosMult angle num)

Returns num multiplied by the cosine of angle.


(SinDiv angle num)

Returns num divided by the sine of angle.


(CosDiv angle num)

Returns num divided by the cosine of angle


References



Also See

 

Official SCI Documentation
Table of Contents

< Previous: Sound Functions Next: File Functions >