Skip to content

Instantly share code, notes, and snippets.

@cmf028
cmf028 / aabb_transform.comp
Last active February 21, 2024 19:13
Optimized matrix transforms of an AABB to an AABB
// The MIT License (MIT)
// Copyright (c) 2018 cmf028
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
^3Warn: Syntax error parsing property declaration 'margin-bottom: 0.3em;' in ui/shared/basics.rcss: 15.
^3Warn: Syntax error parsing property declaration 'margin-top: 1em;' in ui/shared/basics.rcss: 38.
^3Warn: Syntax error parsing property declaration 'height: 1.5em;' in ui/shared/basics.rcss: 45.
^3Warn: Syntax error parsing property declaration 'margin-left: 1.5em;' in ui/shared/basics.rcss: 50.
^3Warn: Syntax error parsing property declaration 'height: 1.21em;' in ui/shared/basics.rcss: 116.
^3Warn: Syntax error parsing property declaration 'margin-top: 0.3em;' in ui/shared/basics.rcss: 118.
^3Warn: Syntax error parsing property declaration 'height: 1.0em;' in ui/shared/basics.rcss: 123.
^3Warn: Syntax error parsing property declaration 'height: 1.5em;' in ui/shared/controls.rcss: 16.
^3Warn: Syntax error parsing property declaration 'padding-left: 0.5em;' in ui/shared/controls.rcss: 17.
^3Warn: Syntax error parsing property declaration 'width: 12em;' in ui/shared/controls.rcss: 20.
@cmf028
cmf028 / gist:6ed4e57e4e66f08703c7
Created April 24, 2015 02:14
Trait object incorrect method selection bug
trait VisitorBase<T> {
fn visit(&mut self, node: &T);
}
trait Visitor : VisitorBase<Num> + VisitorBase<Add> {}
impl<T> Visitor for T where T: VisitorBase<Num> + VisitorBase<Add> {}
trait Node {
fn accept(&self, visitor: &mut Visitor );