Difference between revisions of "User:Abion47/Sandbox"

From Frictional Wiki
Jump to navigation Jump to search
Line 10: Line 10:
 
{{CodeDocSummaryItem|[[../cColor|cColor]]|[[#cColor_Red|cColor_Red]]|}}
 
{{CodeDocSummaryItem|[[../cColor|cColor]]|[[#cColor_Red|cColor_Red]]|}}
 
{{CodeDocSummaryItem|[[../cColor|cColor]]|[[#cColor_White|cColor_White]]|}}
 
{{CodeDocSummaryItem|[[../cColor|cColor]]|[[#cColor_White|cColor_White]]|}}
{{CodeDocSummaryItem|const float|[[#cMath_Epsilon|cMath_Epsilon]]|}}
+
{{CodeDocSummaryItem|float|[[#cMath_Epsilon|cMath_Epsilon]]|The value of correction for small floating point numbers.}}
{{CodeDocSummaryItem|const float|[[#cMath_Pi|cMath_Pi]]|}}
+
{{CodeDocSummaryItem|float|[[#cMath_Pi|cMath_Pi]]|Approximate value of pi.}}
{{CodeDocSummaryItem|const float|[[#cMath_PiDiv2|cMath_PiDiv2]]|}}
+
{{CodeDocSummaryItem|float|[[#cMath_PiDiv2|cMath_PiDiv2]]|Approximate value of pi divided by 2.}}
{{CodeDocSummaryItem|const float|[[#cMath_PiDiv4|cMath_PiDiv4]]|}}
+
{{CodeDocSummaryItem|float|[[#cMath_PiDiv4|cMath_PiDiv4]]|Approximate value of pi divided by 4.}}
{{CodeDocSummaryItem|const float|[[#cMath_PiMul2|cMath_PiMul2]]|}}
+
{{CodeDocSummaryItem|float|[[#cMath_PiMul2|cMath_PiMul2]]|Approximate value of pi multiplied by 2.}}
{{CodeDocSummaryItem|const float|[[#cMath_Sqrt2|cMath_Sqrt2]]|}}
+
{{CodeDocSummaryItem|float|[[#cMath_Sqrt2|cMath_Sqrt2]]|Approximate value of the square root of 2}}
 
{{CodeDocSummaryItem|[[../cMatrixf|cMatrixf]]|[[#cMatrixf_Identity|cMatrixf_Identity]]|}}
 
{{CodeDocSummaryItem|[[../cMatrixf|cMatrixf]]|[[#cMatrixf_Identity|cMatrixf_Identity]]|}}
 
{{CodeDocSummaryItem|[[../cMatrixf|cMatrixf]]|[[#cMatrixf_Zero|cMatrixf_Zero]]|}}
 
{{CodeDocSummaryItem|[[../cMatrixf|cMatrixf]]|[[#cMatrixf_Zero|cMatrixf_Zero]]|}}
Line 45: Line 45:
  
 
{{CodeDocDetailTop|cColor_Blue}}
 
{{CodeDocDetailTop|cColor_Blue}}
<syntaxhighlight lang="c++">const cColor cColor_Blue</syntaxhighlight>
+
<syntaxhighlight lang="c++">const cColor cColor_Blue = cColor(0.0, 0.0, 1.0, 1.0)</syntaxhighlight>
 
{{CodeDocDetailBody|}}
 
{{CodeDocDetailBody|}}
 
{{CodeDocDetailBottom}}
 
{{CodeDocDetailBottom}}
  
 
{{CodeDocDetailTop|cColor_Green}}
 
{{CodeDocDetailTop|cColor_Green}}
<syntaxhighlight lang="c++">const cColor cColor_Green</syntaxhighlight>
+
<syntaxhighlight lang="c++">const cColor cColor_Green = cColor(0.0, 1.0, 0.0, 1.0)</syntaxhighlight>
 
{{CodeDocDetailBody|}}
 
{{CodeDocDetailBody|}}
 
{{CodeDocDetailBottom}}
 
{{CodeDocDetailBottom}}
  
 
{{CodeDocDetailTop|cColor_Red}}
 
{{CodeDocDetailTop|cColor_Red}}
<syntaxhighlight lang="c++">const cColor cColor_Red</syntaxhighlight>
+
<syntaxhighlight lang="c++">const cColor cColor_Red = cColor(1.0, 0.0, 0.0, 1.0)</syntaxhighlight>
 
{{CodeDocDetailBody|}}
 
{{CodeDocDetailBody|}}
 
{{CodeDocDetailBottom}}
 
{{CodeDocDetailBottom}}
  
 
{{CodeDocDetailTop|cColor_White}}
 
{{CodeDocDetailTop|cColor_White}}
<syntaxhighlight lang="c++">const cColor cColor_White</syntaxhighlight>
+
<syntaxhighlight lang="c++">const cColor cColor_White = cColor(1.0, 1.0, 1.0, 1.0)</syntaxhighlight>
 
{{CodeDocDetailBody|}}
 
{{CodeDocDetailBody|}}
 
{{CodeDocDetailBottom}}
 
{{CodeDocDetailBottom}}
  
 
{{CodeDocDetailTop|cMath_Epsilon}}
 
{{CodeDocDetailTop|cMath_Epsilon}}
<syntaxhighlight lang="c++">const float cMath_Epsilon</syntaxhighlight>
+
<syntaxhighlight lang="c++">const float cMath_Epsilon = 0.0001</syntaxhighlight>
{{CodeDocDetailBody|}}
+
{{CodeDocDetailBody|<nowiki>The value of correction for small floating point numbers.</nowiki>
 +
 
 +
<nowiki>When two floats are subtracted, floating point errors can make the result not exact. (i.e. 3.0 - 2.0 == 1.0 may not strictly be true.) As such, if the difference between two floats is less than the value of cMath_Epsilon, those two floats can be considered equal.</nowiki>}}
 
{{CodeDocDetailBottom}}
 
{{CodeDocDetailBottom}}
  
 
{{CodeDocDetailTop|cMath_Pi}}
 
{{CodeDocDetailTop|cMath_Pi}}
<syntaxhighlight lang="c++">const float cMath_Pi</syntaxhighlight>
+
<syntaxhighlight lang="c++">const float cMath_Pi = 3.141593</syntaxhighlight>
{{CodeDocDetailBody|}}
+
{{CodeDocDetailBody|Approximate value of pi.}}
 
{{CodeDocDetailBottom}}
 
{{CodeDocDetailBottom}}
  
 
{{CodeDocDetailTop|cMath_PiDiv2}}
 
{{CodeDocDetailTop|cMath_PiDiv2}}
 
<syntaxhighlight lang="c++">const float cMath_PiDiv2</syntaxhighlight>
 
<syntaxhighlight lang="c++">const float cMath_PiDiv2</syntaxhighlight>
{{CodeDocDetailBody|}}
+
{{CodeDocDetailBody|Approximate value of pi divided by 2.}}
 
{{CodeDocDetailBottom}}
 
{{CodeDocDetailBottom}}
  
 
{{CodeDocDetailTop|cMath_PiDiv4}}
 
{{CodeDocDetailTop|cMath_PiDiv4}}
 
<syntaxhighlight lang="c++">const float cMath_PiDiv4</syntaxhighlight>
 
<syntaxhighlight lang="c++">const float cMath_PiDiv4</syntaxhighlight>
{{CodeDocDetailBody|}}
+
{{CodeDocDetailBody|Approximate value of pi divided by 4.}}
 
{{CodeDocDetailBottom}}
 
{{CodeDocDetailBottom}}
  
 
{{CodeDocDetailTop|cMath_PiMul2}}
 
{{CodeDocDetailTop|cMath_PiMul2}}
 
<syntaxhighlight lang="c++">const float cMath_PiMul2</syntaxhighlight>
 
<syntaxhighlight lang="c++">const float cMath_PiMul2</syntaxhighlight>
{{CodeDocDetailBody|}}
+
{{CodeDocDetailBody|Approximate value of pi multiplied by 2.}}
 
{{CodeDocDetailBottom}}
 
{{CodeDocDetailBottom}}
  
 
{{CodeDocDetailTop|cMath_Sqrt2}}
 
{{CodeDocDetailTop|cMath_Sqrt2}}
 
<syntaxhighlight lang="c++">const float cMath_Sqrt2</syntaxhighlight>
 
<syntaxhighlight lang="c++">const float cMath_Sqrt2</syntaxhighlight>
{{CodeDocDetailBody|}}
+
{{CodeDocDetailBody|Approximate value of the square root of 2.}}
 
{{CodeDocDetailBottom}}
 
{{CodeDocDetailBottom}}
  

Revision as of 22:51, 11 August 2020

Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki!

Constant Summary

Return Type Function and Description
cColor cColor_Blue
cColor cColor_Green
cColor cColor_Red
cColor cColor_White
float cMath_Epsilon
The value of correction for small floating point numbers.
float cMath_Pi
Approximate value of pi.
float cMath_PiDiv2
Approximate value of pi divided by 2.
float cMath_PiDiv4
Approximate value of pi divided by 4.
float cMath_PiMul2
Approximate value of pi multiplied by 2.
float cMath_Sqrt2
Approximate value of the square root of 2
cMatrixf cMatrixf_Identity
cMatrixf cMatrixf_Zero
cQuaternion cQuaternion_Identity
cVector2f cVector2f_Down
cVector2f cVector2f_Left
cVector2f cVector2f_MinusOne
cVector2f cVector2f_One
cVector2f cVector2f_Right
cVector2f cVector2f_Up
cVector2f cVector2f_Zero
cVector2l cVector2l_MinusOne
cVector3f cVector3f_Back
cVector3f cVector3f_Down
cVector3f cVector3f_Forward
cVector3f cVector3f_Left
cVector3f cVector3f_MinusOne
cVector3f cVector3f_One
cVector3f cVector3f_Right
cVector3f cVector3f_Up
cVector3f cVector3f_Zero
cVector4f cVector4f_MinusOne
cVector4f cVector4f_One
cVector4f cVector4f_Zero
tID tID_Invalid

Constant Detail

cColor_Blue

const cColor cColor_Blue = cColor(0.0, 0.0, 1.0, 1.0)

cColor_Green

const cColor cColor_Green = cColor(0.0, 1.0, 0.0, 1.0)

cColor_Red

const cColor cColor_Red = cColor(1.0, 0.0, 0.0, 1.0)

cColor_White

const cColor cColor_White = cColor(1.0, 1.0, 1.0, 1.0)

cMath_Epsilon

const float cMath_Epsilon = 0.0001

The value of correction for small floating point numbers.

When two floats are subtracted, floating point errors can make the result not exact. (i.e. 3.0 - 2.0 == 1.0 may not strictly be true.) As such, if the difference between two floats is less than the value of cMath_Epsilon, those two floats can be considered equal.

cMath_Pi

const float cMath_Pi = 3.141593

Approximate value of pi.

cMath_PiDiv2

const float cMath_PiDiv2

Approximate value of pi divided by 2.

cMath_PiDiv4

const float cMath_PiDiv4

Approximate value of pi divided by 4.

cMath_PiMul2

const float cMath_PiMul2

Approximate value of pi multiplied by 2.

cMath_Sqrt2

const float cMath_Sqrt2

Approximate value of the square root of 2.

cMatrixf_Identity

const cMatrixf cMatrixf_Identity

cMatrixf_Zero

const cMatrixf cMatrixf_Zero

cQuaternion_Identity

const cQuaternion cQuaternion_Identity

cVector2f_Down

const cVector2f cVector2f_Down

cVector2f_Left

const cVector2f cVector2f_Left

cVector2f_MinusOne

const cVector2f cVector2f_MinusOne

cVector2f_One

const cVector2f cVector2f_One

cVector2f_Right

const cVector2f cVector2f_Right

cVector2f_Up

const cVector2f cVector2f_Up

cVector2f_Zero

const cVector2f cVector2f_Zero

cVector2l_MinusOne

const cVector2l cVector2l_MinusOne

cVector3f_Back

const cVector3f cVector3f_Back

cVector3f_Down

const cVector3f cVector3f_Down

cVector3f_Forward

const cVector3f cVector3f_Forward

cVector3f_Left

const cVector3f cVector3f_Left

cVector3f_MinusOne

const cVector3f cVector3f_MinusOne

cVector3f_One

const cVector3f cVector3f_One

cVector3f_Right

const cVector3f cVector3f_Right

cVector3f_Up

const cVector3f cVector3f_Up

cVector3f_Zero

const cVector3f cVector3f_Zero

cVector4f_MinusOne

const cVector4f cVector4f_MinusOne

cVector4f_One

const cVector4f cVector4f_One

cVector4f_Zero

const cVector4f cVector4f_Zero

tID_Invalid

const tID tID_Invalid