Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] Wiki page where?

[DiscordArchive] Wiki page where?

[DiscordArchive] Wiki page where?

Pages (3): Previous 1 2 3
rektbyfaith
Administrator
0
06-04-2018, 07:08 AM
#21
Archived author: schlumpf • Posted: 2018-06-04T07:08:50.209000+00:00
Original source

Where do you think the code and struct come from?!
rektbyfaith
06-04-2018, 07:08 AM #21

Archived author: schlumpf • Posted: 2018-06-04T07:08:50.209000+00:00
Original source

Where do you think the code and struct come from?!

rektbyfaith
Administrator
0
06-04-2018, 07:09 AM
#22
Archived author: Quantam • Posted: 2018-06-04T07:09:53.273000+00:00
Original source

If you have code for multiplication or division of two fixed points, should be immediately obvious whether it's power of two or not (I'd have to think a bit to even figure how you'd write a divider if it's not power of two)
rektbyfaith
06-04-2018, 07:09 AM #22

Archived author: Quantam • Posted: 2018-06-04T07:09:53.273000+00:00
Original source

If you have code for multiplication or division of two fixed points, should be immediately obvious whether it's power of two or not (I'd have to think a bit to even figure how you'd write a divider if it's not power of two)

rektbyfaith
Administrator
0
06-04-2018, 07:10 AM
#23
Archived author: Deamon • Posted: 2018-06-04T07:10:26.977000+00:00
Original source

```
float MathHelper::fp69ToFloat(uint16_t x) {
const float divider = float(1 << 9);
float int_part = (x >> 9);
float float_part = (x & (1<<10) - 1) / divider;
return int_part + float_part;
}
```
rektbyfaith
06-04-2018, 07:10 AM #23

Archived author: Deamon • Posted: 2018-06-04T07:10:26.977000+00:00
Original source

```
float MathHelper::fp69ToFloat(uint16_t x) {
const float divider = float(1 << 9);
float int_part = (x >> 9);
float float_part = (x & (1<<10) - 1) / divider;
return int_part + float_part;
}
```

Pages (3): Previous 1 2 3
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)