mirror of
https://github.com/AxioDL/zeus.git
synced 2026-07-10 21:18:37 -07:00
Compare commits
1 Commits
655ca9e036
...
d64e9f502a
| Author | SHA1 | Date | |
|---|---|---|---|
| d64e9f502a |
@@ -23,7 +23,7 @@ public:
|
|||||||
mSimd[3] = displacement;
|
mSimd[3] = displacement;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] float clipLineSegment(const CVector3f& a, const CVector3f& b) {
|
[[nodiscard]] float clipLineSegment(const CVector3f& a, const CVector3f& b) const {
|
||||||
const float mag = (b - a).dot(normal());
|
const float mag = (b - a).dot(normal());
|
||||||
const float dis = (-(y() - d())) / mag;
|
const float dis = (-(y() - d())) / mag;
|
||||||
return clamp(0.0f, dis, 1.0f);
|
return clamp(0.0f, dis, 1.0f);
|
||||||
|
|||||||
Reference in New Issue
Block a user