Skip to content

Commit

Permalink
Enable debug assertions in XMMatrixReflect and XMMatrixShadow
Browse files Browse the repository at this point in the history
  • Loading branch information
aloucks committed Oct 18, 2020
1 parent a719608 commit 90ef04c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Enable `!XMPlaneIsInfinite` debug assertions in `XMMatrixReflect` and `XMMatrixShadow`.

## [0.2.0] - 2020-09-05
### Fixed
Expand Down
6 changes: 2 additions & 4 deletions src/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2599,8 +2599,7 @@ pub fn XMMatrixReflect(
{
unsafe {
debug_assert!(!XMVector3Equal(ReflectionPlane, XMVectorZero()));
// FIXME: XMPlaneIsInfinite
// debug_assert!(!XMPlaneIsInfinite(ReflectionPlane));
debug_assert!(!XMPlaneIsInfinite(ReflectionPlane));

const NegativeTwo: XMVECTORF32 = XMVECTORF32 { f: [ -2.0, -2.0, -2.0, 0.0 ] };

Expand Down Expand Up @@ -2651,8 +2650,7 @@ pub fn XMMatrixShadow(
const Select0001: XMVECTORU32 = XMVECTORU32 { u: [ XM_SELECT_0, XM_SELECT_0, XM_SELECT_0, XM_SELECT_1 ] };

debug_assert!(!XMVector3Equal(ShadowPlane, XMVectorZero()));
// FIXME: XMPlaneIsInfinite
// debug_assert!(!XMPlaneIsInfinite(ShadowPlane));
debug_assert!(!XMPlaneIsInfinite(ShadowPlane));

let mut P: XMVECTOR = XMPlaneNormalize(ShadowPlane);
let mut Dot: XMVECTOR = XMPlaneDot(P, LightPosition);
Expand Down

0 comments on commit 90ef04c

Please sign in to comment.