Photon Quantum 2.1.1

Properties | List of all members
Photon.Deterministic.FP Struct Reference

A fixed-point number. 16 lower bits are used for the decimal part, 48 for the integral part. More...

Properties

static FP _0 [get]
 Closest double: 0 More...
 
static FP _0_01 [get]
 Closest double: 0.0099945068359375 More...
 
static FP _0_02 [get]
 Closest double: 0.019989013671875 More...
 
static FP _0_03 [get]
 Closest double: 0.0299835205078125 More...
 
static FP _0_04 [get]
 Closest double: 0.03997802734375 More...
 
static FP _0_05 [get]
 Closest double: 0.0499725341796875 More...
 
static FP _0_10 [get]
 Closest double: 0.0999908447265625 More...
 
static FP _0_20 [get]
 Closest double: 0.199996948242188 More...
 
static FP _0_25 [get]
 Closest double: 0.25 More...
 
static FP _0_33 [get]
 Closest double: 0.333328247070313 More...
 
static FP _0_50 [get]
 Closest double: 0.5 More...
 
static FP _0_75 [get]
 Closest double: 0.75 More...
 
static FP _0_99 [get]
 Closest double: 0.990005493164063 More...
 
static FP _1 [get]
 Closest double: 1 More...
 
static FP _10 [get]
 Closest double: 10 More...
 
static FP _100 [get]
 Closest double: 100 More...
 
static FP _1000 [get]
 Closest double: 1000 More...
 
static FP _10000 [get]
 Closest double: 10000 More...
 
static FP _1_01 [get]
 Closest double: 1.00999450683594 More...
 
static FP _1_02 [get]
 Closest double: 1.01998901367188 More...
 
static FP _1_03 [get]
 Closest double: 1.02999877929688 More...
 
static FP _1_04 [get]
 Closest double: 1.03999328613281 More...
 
static FP _1_05 [get]
 Closest double: 1.04998779296875 More...
 
static FP _1_10 [get]
 Closest double: 1.09999084472656 More...
 
static FP _1_20 [get]
 Closest double: 1.19999694824219 More...
 
static FP _1_25 [get]
 Closest double: 1.25 More...
 
static FP _1_33 [get]
 Closest double: 1.33332824707031 More...
 
static FP _1_50 [get]
 Closest double: 1.5 More...
 
static FP _1_75 [get]
 Closest double: 1.75 More...
 
static FP _1_99 [get]
 Closest double: 1.99000549316406 More...
 
static FP _2 [get]
 Closest double: 2 More...
 
static FP _200 [get]
 Closest double: 200 More...
 
static FP _3 [get]
 Closest double: 3 More...
 
static FP _4 [get]
 Closest double: 4 More...
 
static FP _5 [get]
 Closest double: 5 More...
 
static FP _6 [get]
 Closest double: 6 More...
 
static FP _7 [get]
 Closest double: 7 More...
 
static FP _8 [get]
 Closest double: 8 More...
 
static FP _9 [get]
 Closest double: 9 More...
 
static FP _99 [get]
 Closest double: 99 More...
 
Double AsDouble [get]
 Converts to double. More...
 
Single AsFloat [get]
 Converts to float. More...
 
Int32 AsInt [get]
 Return integral part as int. More...
 
Int64 AsLong [get]
 Returns integral part as long. More...
 
Int16 AsShort [get]
 Return integral part as int. More...
 
static FP Deg2Rad [get]
 Closest double: 0.0174407958984375 More...
 
static FP E [get]
 Closest double: 2.71827697753906 More...
 
static FP EN1 [get]
 Closest double: 0.0999908447265625 More...
 
static FP EN2 [get]
 Closest double: 0.0099945068359375 More...
 
static FP EN3 [get]
 Closest double: 0.0009918212890625 More...
 
static FP EN4 [get]
 Closest double: 9.1552734375E-05 More...
 
static FP EN5 [get]
 Closest double: 0 More...
 
static FP Epsilon [get]
 Closest double: 0.0009918212890625 More...
 
static FP Log2_10 [get]
 Closest double: 3.32191467285156 More...
 
static FP Log2_E [get]
 Closest double: 1.44268798828125 More...
 
static FP MaxValue [get]
 Closest double: 140737488355328 More...
 
static FP Minus_1 [get]
 Closest double: -1 More...
 
static FP MinValue [get]
 Closest double: -140737488355328 More...
 
static FP Pi [get]
 Pi number. More...
 
static FP Pi3Over4 [get]
 3 * Pi / 4. More...
 
static FP PiInv [get]
 1/Pi. More...
 
static FP PiOver2 [get]
 Pi / 2. More...
 
static FP PiOver2Inv [get]
 2 / Pi. More...
 
static FP PiOver4 [get]
 Pi / 4. More...
 
static FP PiTimes2 [get]
 2 * Pi. More...
 
static FP Rad2Deg [get]
 Closest double: 57.2957763671875 More...
 
static FP Rad_180 [get]
 Closest double: 3.14158630371094 More...
 
static FP Rad_22_50 [get]
 Closest double: 0.392684936523438 More...
 
static FP Rad_45 [get]
 Closest double: 0.785385131835938 More...
 
static FP Rad_90 [get]
 Closest double: 1.57078552246094 More...
 
static FP SmallestNonZero [get]
 Closest double: 1.52587890625E-05 More...
 
static FP UseableMax [get]
 All values between UseableMin and UseableMax (inclusive) are guaranteed not to overflow when multiplicated. More...
 
static FP UseableMin [get]
 ‭All values between UseableMin and UseableMax (inclusive) are guaranteed not to overflow when multiplicated. More...
 

Detailed Description

A fixed-point number. 16 lower bits are used for the decimal part, 48 for the integral part.

However, majority of internal code and the multiplication operator perform fast multiplication, where the result can use at most 32 bits for the integral part and overflows are not detected. This means that you should stay in System.Int16 range.

See also
FP.UseableMax, FP.UseableMin

Property Documentation

◆ SmallestNonZero

FP Photon.Deterministic.FP.SmallestNonZero
staticget

Closest double: 1.52587890625E-05

◆ MinValue

FP Photon.Deterministic.FP.MinValue
staticget

Closest double: -140737488355328

◆ MaxValue

FP Photon.Deterministic.FP.MaxValue
staticget

Closest double: 140737488355328

◆ UseableMin

FP Photon.Deterministic.FP.UseableMin
staticget

‭All values between UseableMin and UseableMax (inclusive) are guaranteed not to overflow when multiplicated.

Closest double: -32768

◆ UseableMax

FP Photon.Deterministic.FP.UseableMax
staticget

All values between UseableMin and UseableMax (inclusive) are guaranteed not to overflow when multiplicated.

Closest double: 32767.9999847412

◆ Pi

FP Photon.Deterministic.FP.Pi
staticget

Pi number.

Closest double: 3.14158630371094

◆ PiInv

FP Photon.Deterministic.FP.PiInv
staticget

1/Pi.

Closest double: 0.31829833984375

◆ PiTimes2

FP Photon.Deterministic.FP.PiTimes2
staticget

2 * Pi.

Closest double: 6.28317260742188

◆ PiOver2

FP Photon.Deterministic.FP.PiOver2
staticget

Pi / 2.

Closest double: 1.57078552246094

◆ PiOver2Inv

FP Photon.Deterministic.FP.PiOver2Inv
staticget

2 / Pi.

Closest double: 0.636611938476563

◆ PiOver4

FP Photon.Deterministic.FP.PiOver4
staticget

Pi / 4.

Closest double: 0.785385131835938

◆ Pi3Over4

FP Photon.Deterministic.FP.Pi3Over4
staticget

3 * Pi / 4.

Closest double: 2.35618591308594

◆ Deg2Rad

FP Photon.Deterministic.FP.Deg2Rad
staticget

Closest double: 0.0174407958984375

◆ Rad2Deg

FP Photon.Deterministic.FP.Rad2Deg
staticget

Closest double: 57.2957763671875

◆ _0

FP Photon.Deterministic.FP._0
staticget

Closest double: 0

◆ _1

FP Photon.Deterministic.FP._1
staticget

Closest double: 1

◆ _2

FP Photon.Deterministic.FP._2
staticget

Closest double: 2

◆ _3

FP Photon.Deterministic.FP._3
staticget

Closest double: 3

◆ _4

FP Photon.Deterministic.FP._4
staticget

Closest double: 4

◆ _5

FP Photon.Deterministic.FP._5
staticget

Closest double: 5

◆ _6

FP Photon.Deterministic.FP._6
staticget

Closest double: 6

◆ _7

FP Photon.Deterministic.FP._7
staticget

Closest double: 7

◆ _8

FP Photon.Deterministic.FP._8
staticget

Closest double: 8

◆ _9

FP Photon.Deterministic.FP._9
staticget

Closest double: 9

◆ _10

FP Photon.Deterministic.FP._10
staticget

Closest double: 10

◆ _99

FP Photon.Deterministic.FP._99
staticget

Closest double: 99

◆ _100

FP Photon.Deterministic.FP._100
staticget

Closest double: 100

◆ _200

FP Photon.Deterministic.FP._200
staticget

Closest double: 200

◆ _1000

FP Photon.Deterministic.FP._1000
staticget

Closest double: 1000

◆ _10000

FP Photon.Deterministic.FP._10000
staticget

Closest double: 10000

◆ _0_01

FP Photon.Deterministic.FP._0_01
staticget

Closest double: 0.0099945068359375

◆ _0_02

FP Photon.Deterministic.FP._0_02
staticget

Closest double: 0.019989013671875

◆ _0_10

FP Photon.Deterministic.FP._0_10
staticget

Closest double: 0.0999908447265625

◆ _0_20

FP Photon.Deterministic.FP._0_20
staticget

Closest double: 0.199996948242188

◆ _0_25

FP Photon.Deterministic.FP._0_25
staticget

Closest double: 0.25

◆ _0_50

FP Photon.Deterministic.FP._0_50
staticget

Closest double: 0.5

◆ _0_75

FP Photon.Deterministic.FP._0_75
staticget

Closest double: 0.75

◆ _0_03

FP Photon.Deterministic.FP._0_03
staticget

Closest double: 0.0299835205078125

◆ _0_04

FP Photon.Deterministic.FP._0_04
staticget

Closest double: 0.03997802734375

◆ _0_05

FP Photon.Deterministic.FP._0_05
staticget

Closest double: 0.0499725341796875

◆ _0_33

FP Photon.Deterministic.FP._0_33
staticget

Closest double: 0.333328247070313

◆ _0_99

FP Photon.Deterministic.FP._0_99
staticget

Closest double: 0.990005493164063

◆ Minus_1

FP Photon.Deterministic.FP.Minus_1
staticget

Closest double: -1

◆ Rad_180

FP Photon.Deterministic.FP.Rad_180
staticget

Closest double: 3.14158630371094

◆ Rad_90

FP Photon.Deterministic.FP.Rad_90
staticget

Closest double: 1.57078552246094

◆ Rad_45

FP Photon.Deterministic.FP.Rad_45
staticget

Closest double: 0.785385131835938

◆ Rad_22_50

FP Photon.Deterministic.FP.Rad_22_50
staticget

Closest double: 0.392684936523438

◆ _1_01

FP Photon.Deterministic.FP._1_01
staticget

Closest double: 1.00999450683594

◆ _1_02

FP Photon.Deterministic.FP._1_02
staticget

Closest double: 1.01998901367188

◆ _1_03

FP Photon.Deterministic.FP._1_03
staticget

Closest double: 1.02999877929688

◆ _1_04

FP Photon.Deterministic.FP._1_04
staticget

Closest double: 1.03999328613281

◆ _1_05

FP Photon.Deterministic.FP._1_05
staticget

Closest double: 1.04998779296875

◆ _1_10

FP Photon.Deterministic.FP._1_10
staticget

Closest double: 1.09999084472656

◆ _1_20

FP Photon.Deterministic.FP._1_20
staticget

Closest double: 1.19999694824219

◆ _1_25

FP Photon.Deterministic.FP._1_25
staticget

Closest double: 1.25

◆ _1_50

FP Photon.Deterministic.FP._1_50
staticget

Closest double: 1.5

◆ _1_75

FP Photon.Deterministic.FP._1_75
staticget

Closest double: 1.75

◆ _1_33

FP Photon.Deterministic.FP._1_33
staticget

Closest double: 1.33332824707031

◆ _1_99

FP Photon.Deterministic.FP._1_99
staticget

Closest double: 1.99000549316406

◆ EN1

FP Photon.Deterministic.FP.EN1
staticget

Closest double: 0.0999908447265625

◆ EN2

FP Photon.Deterministic.FP.EN2
staticget

Closest double: 0.0099945068359375

◆ EN3

FP Photon.Deterministic.FP.EN3
staticget

Closest double: 0.0009918212890625

◆ EN4

FP Photon.Deterministic.FP.EN4
staticget

Closest double: 9.1552734375E-05

◆ EN5

FP Photon.Deterministic.FP.EN5
staticget

Closest double: 0

◆ Epsilon

FP Photon.Deterministic.FP.Epsilon
staticget

Closest double: 0.0009918212890625

◆ E

FP Photon.Deterministic.FP.E
staticget

Closest double: 2.71827697753906

◆ Log2_E

FP Photon.Deterministic.FP.Log2_E
staticget

Closest double: 1.44268798828125

◆ Log2_10

FP Photon.Deterministic.FP.Log2_10
staticget

Closest double: 3.32191467285156

◆ AsLong

Int64 Photon.Deterministic.FP.AsLong
get

Returns integral part as long.

◆ AsInt

Int32 Photon.Deterministic.FP.AsInt
get

Return integral part as int.

◆ AsShort

Int16 Photon.Deterministic.FP.AsShort
get

Return integral part as int.

◆ AsFloat

Single Photon.Deterministic.FP.AsFloat
get

Converts to float.

◆ AsDouble

Double Photon.Deterministic.FP.AsDouble
get

Converts to double.